mirror of
https://github.com/troglobit/finit.git
synced 2026-11-12 16:51:25 +00:00
api: Fix possible descriptor leak, found by Coverity Scan
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
cbafbaea1d
commit
9e8a01669e
1 file changed
+2
-4
@@ -380,13 +380,11 @@ static void api_cb(uev_t *w, void *arg, int events)
|
|||||||
_d("Failed sending ACK/NACK back to client");
|
_d("Failed sending ACK/NACK back to client");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UEV_ERROR == events)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
leave:
|
leave:
|
||||||
close(sd);
|
close(sd);
|
||||||
|
if (UEV_ERROR == events)
|
||||||
|
goto error;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
api_exit();
|
api_exit();
|
||||||
if (api_init(w->ctx))
|
if (api_init(w->ctx))
|
||||||
|
|||||||
Reference in new issue
Block a user