projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: sink.utils.counter: possible NULL pointer dereference
[babeltrace.git]
/
src
/
plugins
/
utils
/
counter
/
counter.c
diff --git
a/src/plugins/utils/counter/counter.c
b/src/plugins/utils/counter/counter.c
index 6284438f1fe120d5866228d9946b05f4876d3fb4..2ad601675054183bc44a4eb6a29eded3b333c07d 100644
(file)
--- a/
src/plugins/utils/counter/counter.c
+++ b/
src/plugins/utils/counter/counter.c
@@
-114,8
+114,11
@@
void try_print_last(struct counter *counter)
void destroy_private_counter_data(struct counter *counter)
{
void destroy_private_counter_data(struct counter *counter)
{
- bt_self_component_port_input_message_iterator_put_ref(counter->msg_iter);
- g_free(counter);
+ if (counter) {
+ bt_self_component_port_input_message_iterator_put_ref(
+ counter->msg_iter);
+ g_free(counter);
+ }
}
BT_HIDDEN
}
BT_HIDDEN
This page took
0.024844 seconds
and
4
git commands to generate.