summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2015-03-05 18:30:45 (GMT)
committerTim-Philipp Müller <tim@centricular.com>2015-03-05 18:30:45 (GMT)
commit4e777233f59d6326a5a400d93829dac980a86395 (patch)
tree38aa27a9d0287b93903ffdcfb5685de07d51a64b
parent5764316a8e5ee227fbd1255927bbe5d3f9ab3b4a (diff)
downloadgstreamer-4e777233f59d6326a5a400d93829dac980a86395.tar.gz
gstreamer-4e777233f59d6326a5a400d93829dac980a86395.tar.xz
info: avoid malloc/free if log object is NULL
-rw-r--r--gst/gstinfo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gst/gstinfo.c b/gst/gstinfo.c
index a506823..6cb06c8 100644
--- a/gst/gstinfo.c
+++ b/gst/gstinfo.c
@@ -1006,7 +1006,7 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level,
if (object) {
obj = gst_debug_print_object (object);
} else {
- obj = g_strdup ("");
+ obj = (gchar *) "";
}
elapsed = GST_CLOCK_DIFF (_priv_gst_info_start_time,
@@ -1089,7 +1089,8 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level,
#undef PRINT_FMT
}
- g_free (obj);
+ if (object != NULL)
+ g_free (obj);
}
/**