From: Jonathan Rajotte Date: Tue, 4 Feb 2020 21:03:40 +0000 (-0500) Subject: Fix: string might be uninitialized X-Git-Tag: v2.13.0-rc1~773 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=546c03fe47b33fa4490f94a3e441fb51e78bd3b0;ds=inline Fix: string might be uninitialized 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 --- 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;