projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Memory leak in relay_add_stream error path
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
main.c
diff --git
a/src/bin/lttng-relayd/main.c
b/src/bin/lttng-relayd/main.c
index a554aedbfd3c0412e10c46cb6d519d9effddae44..2d3714e684bccab1deba3b522de7b7de3333faa0 100644
(file)
--- a/
src/bin/lttng-relayd/main.c
+++ b/
src/bin/lttng-relayd/main.c
@@
-1352,7
+1352,7
@@
end:
if (ret < 0) {
reply.ret_code = htobe32(LTTNG_ERR_UNK);
/* stream was not properly added to the ht, so free it */
if (ret < 0) {
reply.ret_code = htobe32(LTTNG_ERR_UNK);
/* stream was not properly added to the ht, so free it */
-
free
(stream);
+
stream_destroy
(stream);
} else {
reply.ret_code = htobe32(LTTNG_OK);
}
} else {
reply.ret_code = htobe32(LTTNG_OK);
}
@@
-1369,9
+1369,7
@@
end_no_session:
return ret;
err_free_stream:
return ret;
err_free_stream:
- free(stream->path_name);
- free(stream->channel_name);
- free(stream);
+ stream_destroy(stream);
return ret;
}
return ret;
}
This page took
0.023353 seconds
and
4
git commands to generate.