projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: modprobe.c: fix tmp_list memory leak
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
modprobe.c
diff --git
a/src/bin/lttng-sessiond/modprobe.c
b/src/bin/lttng-sessiond/modprobe.c
index d730a1dae972fb6f76a3907c8e1ad95ed2be61e1..32c4210130d9227b1d4cb320cb66f80ccb6b28d5 100644
(file)
--- a/
src/bin/lttng-sessiond/modprobe.c
+++ b/
src/bin/lttng-sessiond/modprobe.c
@@
-360,11
+360,11
@@
static int append_list_to_probes(const char *list)
{
char *next;
int index = nr_probes, ret;
{
char *next;
int index = nr_probes, ret;
- char *tmp_list;
+ char *tmp_list
, *cur_list
;
assert(list);
assert(list);
- tmp_list = strdup(list);
+
cur_list =
tmp_list = strdup(list);
if (!tmp_list) {
PERROR("strdup temp list");
return -ENOMEM;
if (!tmp_list) {
PERROR("strdup temp list");
return -ENOMEM;
@@
-374,11
+374,11
@@
static int append_list_to_probes(const char *list)
size_t name_len;
struct kern_modules_param *cur_mod;
size_t name_len;
struct kern_modules_param *cur_mod;
- next = strtok(
tmp
_list, ",");
+ next = strtok(
cur
_list, ",");
if (!next) {
break;
}
if (!next) {
break;
}
-
tmp
_list = NULL;
+
cur
_list = NULL;
/* filter leading spaces */
while (*next == ' ') {
/* filter leading spaces */
while (*next == ' ') {
This page took
0.023571 seconds
and
4
git commands to generate.