summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7f87e16)
raw | patch | inline | side by side (parent: 7f87e16)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 20 Jul 2014 20:34:42 +0000 (22:34 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sun, 20 Jul 2014 20:34:42 +0000 (22:34 +0200) |
Thanks to clang-analyze for identifying this!
src/tools/sysdb/command.c | patch | blob | history |
index 505124cae243b8e974c1790f8d04290e38f6c4c4..9dfb6194d40b9db217ab66a519e3d6995bf69c8b 100644 (file)
#include <assert.h>
#include <ctype.h>
+#include <stdlib.h>
#include <string.h>
/*
* sends back. We'll wait for the first reply and then return to the
* main loop which will handle any subsequent replies, including
* eventually the reply to the query (if it's not the first reply). */
- if (sdb_command_print_reply(input->client) < 0)
+ if (sdb_command_print_reply(input->client) < 0) {
+ if (data)
+ free(data);
return NULL;
+ }
}
sdb_strbuf_skip(input->input, 0, input->query_len);