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:
e6b6609
)
Fix: consumer double-close on error
author
Mathieu Desnoyers
<mathieu.desnoyers@efficios.com>
Thu, 27 Jun 2013 21:32:37 +0000
(17:32 -0400)
committer
David Goulet
<dgoulet@efficios.com>
Fri, 28 Jun 2013 14:58:27 +0000
(10:58 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/common/consumer.c
patch
|
blob
|
blame
|
history
diff --git
a/src/common/consumer.c
b/src/common/consumer.c
index 0565f54dfad4da97503a6eb6575e4c51110edc32..5574c5f0e1d545691f6837d2d4100a10c2a59e48 100644
(file)
--- a/
src/common/consumer.c
+++ b/
src/common/consumer.c
@@
-3107,6
+3107,7
@@
int consumer_add_relayd_socket(int net_seq_idx, int sock_type,
/* Assign new file descriptor */
relayd->control_sock.sock.fd = fd;
+ fd = -1; /* For error path */
/* Assign version values. */
relayd->control_sock.major = relayd_sock->major;
relayd->control_sock.minor = relayd_sock->minor;
@@
-3152,6
+3153,7
@@
int consumer_add_relayd_socket(int net_seq_idx, int sock_type,
/* Assign new file descriptor */
relayd->data_sock.sock.fd = fd;
+ fd = -1; /* for eventual error paths */
/* Assign version values. */
relayd->data_sock.major = relayd_sock->major;
relayd->data_sock.minor = relayd_sock->minor;
This page took
0.028991 seconds
and
4
git commands to generate.