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.4.0-rc4~31 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d5d763882a6302f3ea41a691ab17a6cb145039cd;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));