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:
bba2d65
)
Fix: unnecessarily large memory allocation
author
Mathieu Desnoyers
<mathieu.desnoyers@efficios.com>
Tue, 18 Jun 2013 18:58:46 +0000
(14:58 -0400)
committer
David Goulet
<dgoulet@efficios.com>
Wed, 19 Jun 2013 18:47:21 +0000
(14:47 -0400)
1019911
Wrong sizeof argument
In consumer_thread_data_poll: The sizeof operator is invoked on the
wrong argument (CWE-569)
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 45eede109bb5cdc5b019e480ea1ed0bae8f1f8b3..6990dd9678ad2723738e3cf5dd18fe2dd53b069f 100644
(file)
--- a/
src/common/consumer.c
+++ b/
src/common/consumer.c
@@
-2349,7
+2349,7
@@
void *consumer_thread_data_poll(void *data)
/* allocate for all fds + 1 for the consumer_data_pipe */
local_stream = zmalloc((consumer_data.stream_count + 1) *
- sizeof(struct lttng_consumer_stream));
+ sizeof(struct lttng_consumer_stream
*
));
if (local_stream == NULL) {
PERROR("local_stream malloc");
pthread_mutex_unlock(&consumer_data.lock);
This page took
0.026962 seconds
and
4
git commands to generate.