projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: check for NULL in destroy_pretty_data
[babeltrace.git]
/
src
/
plugins
/
text
/
pretty
/
pretty.c
diff --git
a/src/plugins/text/pretty/pretty.c
b/src/plugins/text/pretty/pretty.c
index 3f693e5a815d524f000998a304cbeb3241419789..a925b7d8fce9b9c9b936ef535b0e007d2b253882 100644
(file)
--- a/
src/plugins/text/pretty/pretty.c
+++ b/
src/plugins/text/pretty/pretty.c
@@
-48,6
+48,10
@@
void destroy_pretty_data(struct pretty_component *pretty)
{
bt_self_component_port_input_message_iterator_put_ref(pretty->iterator);
{
bt_self_component_port_input_message_iterator_put_ref(pretty->iterator);
+ if (!pretty) {
+ goto end;
+ }
+
if (pretty->string) {
(void) g_string_free(pretty->string, TRUE);
}
if (pretty->string) {
(void) g_string_free(pretty->string, TRUE);
}
@@
-66,6
+70,9
@@
void destroy_pretty_data(struct pretty_component *pretty)
}
g_free(pretty->options.output_path);
g_free(pretty);
}
g_free(pretty->options.output_path);
g_free(pretty);
+
+end:
+ return;
}
static
}
static
This page took
0.023275 seconds
and
4
git commands to generate.