From: Sebastian Harl Date: Sat, 19 Jul 2014 12:20:03 +0000 (+0200) Subject: sysdb: Fixed a memory leak on EOF from the server. X-Git-Tag: sysdb-0.3.0~46 X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=commitdiff_plain;h=8702f18a2df8bcc8debb6468fc1deb32a5457e5e sysdb: Fixed a memory leak on EOF from the server. --- 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: ");