Skip to content

Commit

Permalink
[GStreamer][MediaStream] gst_object_get_path_string() leaking in medi…
Browse files Browse the repository at this point in the history
…astreamsrc element

https://bugs.webkit.org/show_bug.cgi?id=272752

Reviewed by Xabier Rodriguez-Calvar.

Fix string leak webkitMediaStreamSrcAddPad().

* Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
(webkitMediaStreamSrcAddPad):

Canonical link: https://commits.webkit.org/277599@main
  • Loading branch information
philn committed Apr 17, 2024
1 parent a44e986 commit 99c088c
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -973,7 +973,10 @@ static void webkitMediaStreamSrcEnsureStreamCollectionPosted(WebKitMediaStreamSr

static void webkitMediaStreamSrcAddPad(WebKitMediaStreamSrc* self, GstPad* target, GstStaticPadTemplate* padTemplate, GRefPtr<GstTagList>&& tags, const String& padName)
{
GST_DEBUG_OBJECT(self, "%s Ghosting %" GST_PTR_FORMAT, gst_object_get_path_string(GST_OBJECT_CAST(self)), target);
#ifndef GST_DISABLE_GST_DEBUG
GUniquePtr<char> objectPath(gst_object_get_path_string(GST_OBJECT_CAST(self)));
GST_DEBUG_OBJECT(self, "%s Ghosting %" GST_PTR_FORMAT, objectPath.get(), target);
#endif

auto* ghostPad = webkitGstGhostPadFromStaticTemplate(padTemplate, padName.ascii().data(), target);
gst_pad_set_active(ghostPad, TRUE);
Expand Down

0 comments on commit 99c088c

Please sign in to comment.