From: David Goulet Date: Thu, 10 Nov 2011 20:16:51 +0000 (-0500) Subject: Fix NULL dereference in liblttngctl X-Git-Tag: v2.0-pre15~135 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a45d55367ba37e6561f709e2397b6d51126fb735;p=lttng-tools.git Fix NULL dereference in liblttngctl Signed-off-by: David Goulet --- diff --git a/liblttngctl/lttngctl.c b/liblttngctl/lttngctl.c index a1e577b2b..d0ba52bbf 100644 --- a/liblttngctl/lttngctl.c +++ b/liblttngctl/lttngctl.c @@ -335,7 +335,9 @@ 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; + if (buf != NULL) { + *buf = NULL; + } ret = 0; goto end; }