projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: leak on UST buffer registry creation error
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
buffer-registry.c
diff --git
a/src/bin/lttng-sessiond/buffer-registry.c
b/src/bin/lttng-sessiond/buffer-registry.c
index 93da2f12253270c54856bc9fe303ff392141d260..0ff76defbdcce18ad8aae47b28f9b7a43951af19 100644
(file)
--- a/
src/bin/lttng-sessiond/buffer-registry.c
+++ b/
src/bin/lttng-sessiond/buffer-registry.c
@@
-16,6
+16,7
@@
*/
#define _GNU_SOURCE
*/
#define _GNU_SOURCE
+#define _LGPL_SOURCE
#include <inttypes.h>
#include <common/common.h>
#include <inttypes.h>
#include <common/common.h>
@@
-377,6
+378,7
@@
void buffer_reg_stream_add(struct buffer_reg_stream *stream,
pthread_mutex_lock(&channel->stream_list_lock);
cds_list_add_tail(&stream->lnode, &channel->streams);
pthread_mutex_lock(&channel->stream_list_lock);
cds_list_add_tail(&stream->lnode, &channel->streams);
+ channel->stream_count++;
pthread_mutex_unlock(&channel->stream_list_lock);
}
pthread_mutex_unlock(&channel->stream_list_lock);
}
@@
-504,6
+506,7
@@
void buffer_reg_channel_destroy(struct buffer_reg_channel *regp,
/* Wipe stream */
cds_list_for_each_entry_safe(sreg, stmp, ®p->streams, lnode) {
cds_list_del(&sreg->lnode);
/* Wipe stream */
cds_list_for_each_entry_safe(sreg, stmp, ®p->streams, lnode) {
cds_list_del(&sreg->lnode);
+ regp->stream_count--;
buffer_reg_stream_destroy(sreg, domain);
}
buffer_reg_stream_destroy(sreg, domain);
}
This page took
0.027193 seconds
and
4
git commands to generate.