From: David Goulet Date: Mon, 19 Sep 2011 20:23:47 +0000 (-0400) Subject: Fix uninitialized pointer X-Git-Tag: v2.0-pre14~23 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=684d34d2e47cf8ad4039fa9b3170a122b6dd9faa;p=lttng-tools.git Fix uninitialized pointer Causing the free() to fail on error. Reported-by: Yannick Brosseau Signed-off-by: David Goulet --- diff --git a/ltt-sessiond/main.c b/ltt-sessiond/main.c index c85ff0351..867ba4188 100644 --- a/ltt-sessiond/main.c +++ b/ltt-sessiond/main.c @@ -1455,7 +1455,7 @@ static void init_kernel_tracer(void) int ret; char *proc_mounts = "/proc/mounts"; char line[256]; - char *debugfs_path = NULL, *lttng_path; + char *debugfs_path = NULL, *lttng_path = NULL; FILE *fp; /* Detect debugfs */ @@ -2609,7 +2609,7 @@ static int process_client_msg(struct command_ctx *cmd_ctx) case LTTNG_LIST_EVENTS: { size_t nb_event; - struct lttng_event *events; + struct lttng_event *events = NULL; nb_event = cmd_list_events(cmd_ctx->session, cmd_ctx->lsm->u.list.channel_name, &events);