mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
info: avoid malloc/free if log object is NULL
This commit is contained in:
parent
5764316a8e
commit
4e777233f5
1 changed files with 3 additions and 2 deletions
|
@ -1006,7 +1006,7 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level,
|
||||||
if (object) {
|
if (object) {
|
||||||
obj = gst_debug_print_object (object);
|
obj = gst_debug_print_object (object);
|
||||||
} else {
|
} else {
|
||||||
obj = g_strdup ("");
|
obj = (gchar *) "";
|
||||||
}
|
}
|
||||||
|
|
||||||
elapsed = GST_CLOCK_DIFF (_priv_gst_info_start_time,
|
elapsed = GST_CLOCK_DIFF (_priv_gst_info_start_time,
|
||||||
|
@ -1089,7 +1089,8 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level,
|
||||||
#undef PRINT_FMT
|
#undef PRINT_FMT
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (obj);
|
if (object != NULL)
|
||||||
|
g_free (obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue