From ab6cab06766f86086b53f2720d566f7ddf70db4c Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 22 Sep 2007 13:34:12 +0200 Subject: [PATCH] Fix com_lsblob(). In case no output was produced, don't access output data and don't free it. --- blob.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/blob.c b/blob.c index 55956450..c6b05b2b 100644 --- a/blob.c +++ b/blob.c @@ -138,9 +138,10 @@ static int com_lsblob(callback_function *f, int fd, int argc, char * const * con return -E_BLOB_SYNTAX; ret = send_option_arg_callback_request(&query, argc - i, argv + i, f, &ls_output); - if (ret >= 0 && ls_output.data) + if (ret > 0) { send_buffer(fd, (char *)ls_output.data); - free(ls_output.data); + free(ls_output.data); + } return ret; } -- 2.39.5