projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: increment channel refcount on add_stream
[lttng-tools.git]
/
src
/
common
/
consumer.c
diff --git
a/src/common/consumer.c
b/src/common/consumer.c
index 044a504cec512443039e15eac186df07e841f896..5ca2e7bad68187f7b61b628a28ae0932658a3ccb 100644
(file)
--- a/
src/common/consumer.c
+++ b/
src/common/consumer.c
@@
-463,6
+463,13
@@
void consumer_del_stream(struct lttng_consumer_stream *stream,
PERROR("munmap");
}
}
PERROR("munmap");
}
}
+
+ if (stream->wait_fd >= 0) {
+ ret = close(stream->wait_fd);
+ if (ret) {
+ PERROR("close");
+ }
+ }
break;
case LTTNG_CONSUMER32_UST:
case LTTNG_CONSUMER64_UST:
break;
case LTTNG_CONSUMER32_UST:
case LTTNG_CONSUMER64_UST:
@@
-899,7
+906,7
@@
int consumer_add_channel(struct lttng_consumer_channel *channel,
/* Channel already exist. Ignore the insertion */
ERR("Consumer add channel key %" PRIu64 " already exists!",
channel->key);
/* Channel already exist. Ignore the insertion */
ERR("Consumer add channel key %" PRIu64 " already exists!",
channel->key);
- ret =
-1
;
+ ret =
LTTNG_ERR_KERN_CHAN_EXIST
;
goto end;
}
goto end;
}
@@
-1876,6
+1883,13
@@
void consumer_del_metadata_stream(struct lttng_consumer_stream *stream,
PERROR("munmap metadata stream");
}
}
PERROR("munmap metadata stream");
}
}
+
+ if (stream->wait_fd >= 0) {
+ ret = close(stream->wait_fd);
+ if (ret < 0) {
+ PERROR("close kernel metadata wait_fd");
+ }
+ }
break;
case LTTNG_CONSUMER32_UST:
case LTTNG_CONSUMER64_UST:
break;
case LTTNG_CONSUMER32_UST:
case LTTNG_CONSUMER64_UST:
This page took
0.026376 seconds
and
5
git commands to generate.