Fix uninitialized pointer
authorDavid Goulet <david.goulet@polymtl.ca>
Mon, 19 Sep 2011 20:23:47 +0000 (16:23 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Mon, 19 Sep 2011 20:44:46 +0000 (16:44 -0400)
Causing the free() to fail on error.

Reported-by: Yannick Brosseau <yannick.brosseau@polymtl.ca>
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
ltt-sessiond/main.c

index c85ff03511e55c9d78b676c457dfd5b58077b1f5..867ba4188e37419c2f419429248126c97143bae8 100644 (file)
@@ -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);
This page took 0.028337 seconds and 4 git commands to generate.