mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
shm: Don't leak GstShmPipe
By reordering the leaking code path to before the allocation CID #1212153
This commit is contained in:
parent
93ef3f9b24
commit
b2e037b7de
1 changed files with 5 additions and 4 deletions
|
@ -214,10 +214,7 @@ gst_shm_src_get_property (GObject * object, guint prop_id,
|
|||
static gboolean
|
||||
gst_shm_src_start_reading (GstShmSrc * self)
|
||||
{
|
||||
GstShmPipe *gstpipe = g_slice_new0 (GstShmPipe);
|
||||
|
||||
gstpipe->use_count = 1;
|
||||
gstpipe->src = gst_object_ref (self);
|
||||
GstShmPipe *gstpipe;
|
||||
|
||||
if (!self->socket_path) {
|
||||
GST_ELEMENT_ERROR (self, RESOURCE, NOT_FOUND,
|
||||
|
@ -225,6 +222,10 @@ gst_shm_src_start_reading (GstShmSrc * self)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
gstpipe = g_slice_new0 (GstShmPipe);
|
||||
gstpipe->use_count = 1;
|
||||
gstpipe->src = gst_object_ref (self);
|
||||
|
||||
GST_DEBUG_OBJECT (self, "Opening socket %s", self->socket_path);
|
||||
|
||||
GST_OBJECT_LOCK (self);
|
||||
|
|
Loading…
Reference in a new issue