This commit resolves the following Coverity warnings:
CID
1412123 (#1 of 1): Resource leak (RESOURCE_LEAK)12. leaked_handle:
Handle variable sk_nl going out of scope leaks the handle.
CID
1412129 (#1 of 1): Resource leak (RESOURCE_LEAK)13. leaked_handle:
Handle variable sk_unix going out of scope leaks the handle.
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
}
close_and_exit:
- if (sk_nl > 0)
+ if (sk_nl >= 0)
close(sk_nl);
- if (sk_unix > 0)
+ if (sk_unix >= 0)
close(sk_unix);
return rc;
}