From: David Goulet Date: Wed, 15 Jan 2014 20:30:47 +0000 (-0500) Subject: Fix: zero out data structure before using it X-Git-Tag: v2.5.0-rc1~259 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=996de3c771ebf249a9a40e5ff76daf60d55cb02f;p=lttng-tools.git Fix: zero out data structure before using it Fixes #716 Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index dd9e6927e..73ba7740f 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -1439,6 +1439,7 @@ int cmd_enable_event(struct ltt_session *session, struct lttng_domain *domain, assert(usess); /* Create the default JUL tracepoint. */ + memset(&uevent, 0, sizeof(uevent)); uevent.type = LTTNG_EVENT_TRACEPOINT; uevent.loglevel_type = LTTNG_EVENT_LOGLEVEL_ALL; strncpy(uevent.name, DEFAULT_JUL_EVENT_NAME, sizeof(uevent.name));