Fix: string might be uninitialized
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 4 Feb 2020 21:03:40 +0000 (16:03 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 7 Feb 2020 18:44:49 +0000 (13:44 -0500)
lttng_dynamic_appen_buffer accepts NULL buf as long as len is zero when
called. This is the case for when the id is a numeric value.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Change-Id: Ia1a121dcc2448378a4ad873ac159a89221e4c637
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/tracker.c

index 0fdbd60f9eaacce380478be6b3dc9b68e77b3944..7c97d561c982139283afde068394da7703a161c6 100644 (file)
@@ -302,7 +302,7 @@ int lttng_tracker_ids_serialize(const struct lttng_tracker_ids *ids,
 {
        int ret = 0;
        int value;
-       const char *string;
+       const char *string = NULL;
        unsigned int count;
        enum lttng_tracker_id_status status;
        const struct lttng_tracker_id *id;
This page took 0.027558 seconds and 4 git commands to generate.