From 546c03fe47b33fa4490f94a3e441fb51e78bd3b0 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Tue, 4 Feb 2020 16:03:40 -0500 Subject: [PATCH] Fix: string might be uninitialized MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Change-Id: Ia1a121dcc2448378a4ad873ac159a89221e4c637 Signed-off-by: Jérémie Galarneau --- src/common/tracker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/tracker.c b/src/common/tracker.c index 0fdbd60f9..7c97d561c 100644 --- a/src/common/tracker.c +++ b/src/common/tracker.c @@ -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; -- 2.34.1