From 3bb2eb2a8d65cd0ddfcc7c9450bf0d8d0074982b Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sat, 4 Mar 2023 11:44:48 +0100 Subject: [PATCH] Fix potential socket leak at bootstrap and shutdown This is a follow-up to a39ee0b, found by Coverity Scan. Signed-off-by: Joachim Wiberg --- src/api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api.c b/src/api.c index 75ae7d9e..c8628782 100644 --- a/src/api.c +++ b/src/api.c @@ -377,7 +377,7 @@ static void api_cb(uev_t *w, void *arg, int events) case INIT_CMD_SUSPEND: if (runlevel == 0 || runlevel == 6) { warnx("Unsupported command in runlevel S and 6."); - return; + goto leave; } default: break;