From: David Goulet Date: Wed, 27 Jul 2011 20:13:46 +0000 (-0400) Subject: Fix uninitialized kprobe attributes X-Git-Tag: v2.0-pre4~3 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=3000dc785dc25a265485f7b3f7bc3c023d2e67dd;hp=8ff0bbd0a1d80262d931896bf4efe60bd6dba70a Fix uninitialized kprobe attributes Signed-off-by: David Goulet --- diff --git a/lttng/commands/enable_events.c b/lttng/commands/enable_events.c index 747e5dd80..f5e243156 100644 --- a/lttng/commands/enable_events.c +++ b/lttng/commands/enable_events.c @@ -124,6 +124,7 @@ static int parse_probe_opts(struct lttng_event *ev, char *opt) } ev->attr.probe.offset = strtoul(s_hex, NULL, 0); DBG("probe offset %" PRIu64, ev->attr.probe.offset); + ev->attr.probe.addr = 0; goto error; } @@ -137,6 +138,8 @@ static int parse_probe_opts(struct lttng_event *ev, char *opt) } ev->attr.probe.addr = strtoul(s_hex, NULL, 0); DBG("probe addr %" PRIu64, ev->attr.probe.addr); + ev->attr.probe.offset = 0; + memset(ev->attr.probe.symbol_name, 0, LTTNG_SYMBOL_NAME_LEN); goto error; }