Reported-by: Hannes Weisbach <hannes.weisbach@mailbox.tu-dresden.de>
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
{
char *next;
int index = nr_probes, ret;
- char *tmp_list;
+ char *tmp_list, *cur_list;
assert(list);
- tmp_list = strdup(list);
+ cur_list = tmp_list = strdup(list);
if (!tmp_list) {
PERROR("strdup temp list");
return -ENOMEM;
size_t name_len;
struct kern_modules_param *cur_mod;
- next = strtok(tmp_list, ",");
+ next = strtok(cur_list, ",");
if (!next) {
break;
}
- tmp_list = NULL;
+ cur_list = NULL;
/* filter leading spaces */
while (*next == ' ') {