projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: sessiond ust-app session teardown race
[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 66a4657d688a1ded0da4322b7eb69f33b156e396..bc2234f024a61e1d0a76c36dc8fa55396daf9e28 100644
(file)
--- a/
src/bin/lttng-sessiond/modprobe.c
+++ b/
src/bin/lttng-sessiond/modprobe.c
@@
-359,10
+359,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, *cur_list;
assert(list);
assert(list);
- c
har *
tmp_list = strdup(list);
+ c
ur_list =
tmp_list = strdup(list);
if (!tmp_list) {
PERROR("strdup temp list");
return -ENOMEM;
if (!tmp_list) {
PERROR("strdup temp list");
return -ENOMEM;
@@
-372,11
+373,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 == ' ') {
@@
-393,7
+394,7
@@
static int append_list_to_probes(const char *list)
/* Length 13 is "lttng-probe-" + \0 */
name_len = strlen(next) + 13;
/* 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");
cur_mod->name = zmalloc(name_len);
if (!cur_mod->name) {
PERROR("malloc probe list");
This page took
0.026168 seconds
and
4
git commands to generate.