projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: use after free error code path
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
live.c
diff --git
a/src/bin/lttng-relayd/live.c
b/src/bin/lttng-relayd/live.c
index 445f432e416a60f584516770c96bf3d278685d2b..c70c31762f7d7f0dd7c40e63acffadf3a1d46c4b 100644
(file)
--- a/
src/bin/lttng-relayd/live.c
+++ b/
src/bin/lttng-relayd/live.c
@@
-694,6
+694,7
@@
int viewer_connect(struct relay_connection *conn)
health_code_update();
health_code_update();
+ memset(&msg, 0, sizeof(msg));
reply.major = RELAYD_VERSION_COMM_MAJOR;
reply.minor = RELAYD_VERSION_COMM_MINOR;
reply.major = RELAYD_VERSION_COMM_MAJOR;
reply.minor = RELAYD_VERSION_COMM_MINOR;
@@
-1634,7
+1635,7
@@
int viewer_create_session(struct relay_connection *conn)
DBG("Viewer create session received");
resp.status = htobe32(LTTNG_VIEWER_CREATE_SESSION_OK);
DBG("Viewer create session received");
resp.status = htobe32(LTTNG_VIEWER_CREATE_SESSION_OK);
- conn->viewer_session = zmalloc(sizeof(conn->viewer_session));
+ conn->viewer_session = zmalloc(sizeof(
*
conn->viewer_session));
if (!conn->viewer_session) {
ERR("Allocation viewer session");
resp.status = htobe32(LTTNG_VIEWER_CREATE_SESSION_ERR);
if (!conn->viewer_session) {
ERR("Allocation viewer session");
resp.status = htobe32(LTTNG_VIEWER_CREATE_SESSION_ERR);
This page took
0.024039 seconds
and
4
git commands to generate.