From: David Goulet Date: Thu, 10 Nov 2011 20:07:48 +0000 (-0500) Subject: Fix not NULL pointer on size 0 X-Git-Tag: v2.0-pre15~138 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=874d3f847b8053e38a50321b17abce4248ce6e53 Fix not NULL pointer on size 0 Signed-off-by: David Goulet --- diff --git a/liblttngctl/lttngctl.c b/liblttngctl/lttngctl.c index 90977f8c3..a1e577b2b 100644 --- a/liblttngctl/lttngctl.c +++ b/liblttngctl/lttngctl.c @@ -334,6 +334,8 @@ static int ask_sessiond(struct lttcomm_session_msg *lsm, void **buf) size = llm.data_size; if (size == 0) { + /* If client free with size 0 */ + *buf = NULL; ret = 0; goto end; }