From 40c4078e972971ac02c1b07fc50f123201f33ce4 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 5 May 2015 14:38:32 +0200 Subject: [PATCH] iscsi-scstd: Fix a file descriptor leak in an error path Detected by Coverity. Signed-off-by: Bart Van Assche --- iscsi-scst/usr/event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/iscsi-scst/usr/event.c b/iscsi-scst/usr/event.c index 719c7e2a6..2dbf387bb 100644 --- a/iscsi-scst/usr/event.c +++ b/iscsi-scst/usr/event.c @@ -1188,6 +1188,7 @@ int nl_open(void) res = nl_write(nl_fd, NULL, 0); if (res < 0) { log_error("%s %d\n", __FUNCTION__, res); + close(nl_fd); return res; }