From a45d55367ba37e6561f709e2397b6d51126fb735 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Thu, 10 Nov 2011 15:16:51 -0500 Subject: [PATCH] Fix NULL dereference in liblttngctl Signed-off-by: David Goulet --- liblttngctl/lttngctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.34.1