Discussion:
[Bug 778739] New: smoothstreaming: change g_free() location
(too old to reply)
"GStreamer" (GNOME Bugzilla)
2017-02-16 06:20:23 UTC
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=778739

Bug ID: 778739
Summary: smoothstreaming: change g_free() location
Classification: Platform
Product: GStreamer
Version: git master
OS: Windows
Status: NEW
Severity: normal
Priority: Normal
Component: gst-plugins-bad
Assignee: gstreamer-***@lists.freedesktop.org
Reporter: ***@samsung.com
QA Contact: gstreamer-***@lists.freedesktop.org
GNOME version: ---

If tmpl is NULL name is not free.
so we need to fix as below.

/* TODO use stream's name/bitrate/index as the pad name? */
if (streamtype == MSS_STREAM_TYPE_VIDEO) {
name = g_strdup_printf ("video_%02u", mssdemux->n_videos++);
tmpl = gst_static_pad_template_get (&gst_mss_demux_videosrc_template);
} else if (streamtype == MSS_STREAM_TYPE_AUDIO) {
name = g_strdup_printf ("audio_%02u", mssdemux->n_audios++);
tmpl = gst_static_pad_template_get (&gst_mss_demux_audiosrc_template);
}

if (tmpl != NULL) {
srcpad = GST_PAD_CAST (gst_pad_new_from_template (tmpl, name));
- g_free (name)
gst_object_unref (tmpl);
}
+ g_free (name);
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-16 06:25:18 UTC
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=778739

--- Comment #1 from Hyunil Park <***@samsung.com> ---
Created attachment 345921
--> https://bugzilla.gnome.org/attachment.cgi?id=345921&action=edit
patch for bug

If tmpl is NULL, string is not free.
so we need to modfiy it as patch.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-21 15:21:51 UTC
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=778739

Tim-Philipp Müller <***@zen.co.uk> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
CC| |***@zen.co.uk

--- Comment #2 from Tim-Philipp Müller <***@zen.co.uk> ---
I don't see how this can actually happen in practice?

Did you find this in a real world scenario or with some code checker like
coverity?
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-02-22 00:16:02 UTC
Permalink
Raw Message
https://bugzilla.gnome.org/show_bug.cgi?id=778739

--- Comment #3 from Hyunil Park <***@samsung.com> ---
I use a static analysis tool for finding defect in a source code.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
Loading...