From 8702f18a2df8bcc8debb6468fc1deb32a5457e5e Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sat, 19 Jul 2014 14:20:03 +0200 Subject: [PATCH] sysdb: Fixed a memory leak on EOF from the server. --- src/tools/sysdb/command.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tools/sysdb/command.c b/src/tools/sysdb/command.c index be41b15..505124c 100644 --- a/src/tools/sysdb/command.c +++ b/src/tools/sysdb/command.c @@ -61,8 +61,10 @@ sdb_command_print_reply(sdb_client_t *client) if (sdb_client_recv(client, &rcode, recv_buf) < 0) rcode = UINT32_MAX; - if (sdb_client_eof(client)) + if (sdb_client_eof(client)) { + sdb_strbuf_destroy(recv_buf); return -1; + } if (rcode == UINT32_MAX) { printf("ERROR: "); -- 2.30.2