projects
/
lttng-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f853c53
)
Fix: data leak in error path of cmd_register_consumer()
author
David Goulet
<dgoulet@efficios.com>
Tue, 14 May 2013 16:07:00 +0000
(12:07 -0400)
committer
David Goulet
<dgoulet@efficios.com>
Tue, 14 May 2013 16:08:13 +0000
(12:08 -0400)
Issue
1019923
of coverity scan.
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/cmd.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/lttng-sessiond/cmd.c
b/src/bin/lttng-sessiond/cmd.c
index 528665a141680d70d94bb979f5c76583bf454790..4eacb3c890ff27f33d5a985b868a68dce7d65abc 100644
(file)
--- a/
src/bin/lttng-sessiond/cmd.c
+++ b/
src/bin/lttng-sessiond/cmd.c
@@
-1831,7
+1831,7
@@
int cmd_register_consumer(struct ltt_session *session, int domain,
const char *sock_path, struct consumer_data *cdata)
{
int ret, sock;
- struct consumer_socket *socket;
+ struct consumer_socket *socket
= NULL
;
assert(session);
assert(cdata);
@@
-1891,9
+1891,12
@@
int cmd_register_consumer(struct ltt_session *session, int domain,
goto error;
}
- ret
=
LTTNG_OK;
+ ret
urn
LTTNG_OK;
error:
+ if (socket) {
+ consumer_destroy_socket(socket);
+ }
return ret;
}
This page took
0.028823 seconds
and
4
git commands to generate.