From ebb55faa02862943194ece904236a10200125c95 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Mon, 11 May 2020 16:08:48 +0200 Subject: [PATCH] ceph plugin: Initialize file descriptor to -1. (struct cconn).asok was implicitly initialized to zero. If connecting to a ceph daemon failed, the field would be left unmodified and cconn_close() would eventually close file descriptor 0. --- src/ceph.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ceph.c b/src/ceph.c index 8048f5ddc..aed660a8e 100644 --- a/src/ceph.c +++ b/src/ceph.c @@ -1326,6 +1326,7 @@ static ssize_t cconn_main_loop(uint32_t request_type) { .d = g_daemons[i], .request_type = request_type, .state = CSTATE_UNCONNECTED, + .asok = -1, }; } -- 2.47.2