summaryrefslogtreecommitdiffstats
path: root/ctdb/common/ctdb_daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'ctdb/common/ctdb_daemon.c')
-rw-r--r--ctdb/common/ctdb_daemon.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ctdb/common/ctdb_daemon.c b/ctdb/common/ctdb_daemon.c
index 6e9fbedb2f..72ab7ed0b1 100644
--- a/ctdb/common/ctdb_daemon.c
+++ b/ctdb/common/ctdb_daemon.c
@@ -283,6 +283,11 @@ static void ctdb_client_read_cb(uint8_t *data, size_t cnt, void *args)
struct ctdb_client *client = talloc_get_type(args, struct ctdb_client);
struct ctdb_req_header *hdr;
+ if (cnt == 0) {
+ talloc_free(client);
+ return;
+ }
+
if (cnt < sizeof(*hdr)) {
ctdb_set_error(client->ctdb, "Bad packet length %d\n", cnt);
return;