summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c855b1e)
Move the NULL check for pretty before we dereference it.
Reported-by: Coverity
Change-Id: I2e598e734d4503ec17754dabf915d8264edcf4a7
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2179
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
static
void destroy_pretty_data(struct pretty_component *pretty)
{
static
void destroy_pretty_data(struct pretty_component *pretty)
{
- bt_self_component_port_input_message_iterator_put_ref(pretty->iterator);
-
if (!pretty) {
goto end;
}
if (!pretty) {
goto end;
}
+ bt_self_component_port_input_message_iterator_put_ref(pretty->iterator);
+
if (pretty->string) {
(void) g_string_free(pretty->string, TRUE);
}
if (pretty->string) {
(void) g_string_free(pretty->string, TRUE);
}