From 874d3f847b8053e38a50321b17abce4248ce6e53 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Thu, 10 Nov 2011 15:07:48 -0500 Subject: [PATCH] Fix not NULL pointer on size 0 Signed-off-by: David Goulet --- liblttngctl/lttngctl.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- 2.34.1