From: Philippe Proulx Date: Tue, 28 Apr 2015 21:08:58 +0000 (-0400) Subject: Fix: append_list_to_probes(): increment index X-Git-Tag: v2.7.0-rc1~35 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=9ae17e21d5de3a709182f11eaba3ba175ee0c432;hp=7a988b549113d01a43abefb7eff036f0ba2b98a3 Fix: append_list_to_probes(): increment index Reported-by: Hannes Weisbach Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/modprobe.c b/src/bin/lttng-sessiond/modprobe.c index a9035dab5..d730a1dae 100644 --- a/src/bin/lttng-sessiond/modprobe.c +++ b/src/bin/lttng-sessiond/modprobe.c @@ -395,7 +395,7 @@ static int append_list_to_probes(const char *list) /* Length 13 is "lttng-probe-" + \0 */ name_len = strlen(next) + 13; - cur_mod = &probes[index]; + cur_mod = &probes[index++]; cur_mod->name = zmalloc(name_len); if (!cur_mod->name) { PERROR("malloc probe list");