vlibmemory: coverity woes 46/18046/3
authorSteven Luong <sluong@cisco.com>
Wed, 6 Mar 2019 04:07:31 +0000 (20:07 -0800)
committerDamjan Marion <dmarion@me.com>
Thu, 7 Mar 2019 10:26:12 +0000 (10:26 +0000)
commit8905347d815a9ca0a7453351dbee7c94ebb14e49
tree135d5b115cdc9caad277f46744940dd4a800fbc1
parent313f1b9e5b964fc2e6f654576e2dd50a904846d6
vlibmemory: coverity woes

Coverity complains about resource leak after open when fd gets 0 with below
warning.

off_by_one: Testing whether handle tfd is strictly greater than zero is
suspicious. tfd leaks when it is zero.

It is right. 0 is a valid fd. -1 is not.

Change-Id: I22c2eb75b99bb6209921b9f874190cbbdf10e6ce
Signed-off-by: Steven Luong <sluong@cisco.com>
src/vlibmemory/memory_shared.c