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.6.1~108 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=623f7b8863c87b054be75316654e2d7c215e98ab;p=lttng-tools.git 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 66a4657d6..15d075a76 100644 --- a/src/bin/lttng-sessiond/modprobe.c +++ b/src/bin/lttng-sessiond/modprobe.c @@ -393,7 +393,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");