Skip to contentSkip to conversation

Fix: possible double-close on stream out_fd

PATCH David Goulet 1 participant 1 message Jul 5, 2013 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20130704223735.GA10902@Krystal

#1 lore raw

Merged

Mathieu Desnoyers:

Quoted 11 lines

---

src/common/kernel-consumer/kernel-consumer.c +0 -0
index fc86965..06801b9 100644
@@ -582,11 +582,12 @@ int lttng_kconsumer_on_recv_stream(struct lttng_consumer_stream *stream)
 	return 0;
 
 error_close_fd:

src/common/kernel-consumer/kernel-consumer.c int lttng_kconsumer_on_recv_stream(struct lttng_consumer_stream *stream) · line 593

Quoted 10 lines
src/common/kernel-consumer/kernel-consumer.c +2 -1
-	{
+	if (stream->out_fd >= 0) {
 		int err;
 
 		err = close(stream->out_fd);
 		assert(!err);
+		stream->out_fd = -1;
 	}
 error:
 	return ret;

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev