mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-06 11:35:32 +00:00
sip: media-pipeline: Fix memory leak in error path
This commit is contained in:
parent
9cd13ca681
commit
06076a864a
1 changed files with 13 additions and 7 deletions
|
@ -569,7 +569,7 @@ initable_init (GInitable *initable,
|
|||
if (gst_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK) {
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"Failed to link rtpsrc to rtpbin");
|
||||
return FALSE;
|
||||
goto err;
|
||||
}
|
||||
gst_object_unref (srcpad);
|
||||
gst_object_unref (sinkpad);
|
||||
|
@ -579,7 +579,7 @@ initable_init (GInitable *initable,
|
|||
if (gst_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK) {
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"Failed to link rtcpsrc to rtpbin");
|
||||
return FALSE;
|
||||
goto err;
|
||||
}
|
||||
gst_object_unref (srcpad);
|
||||
gst_object_unref (sinkpad);
|
||||
|
@ -589,7 +589,7 @@ initable_init (GInitable *initable,
|
|||
if (gst_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK) {
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"Failed to link rtpbin to rtcpsink");
|
||||
return FALSE;
|
||||
goto err;
|
||||
}
|
||||
gst_object_unref (srcpad);
|
||||
gst_object_unref (sinkpad);
|
||||
|
@ -605,7 +605,7 @@ initable_init (GInitable *initable,
|
|||
if (gst_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK) {
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"Failed to link payloader to rtpbin");
|
||||
return FALSE;
|
||||
goto err;
|
||||
}
|
||||
gst_object_unref (srcpad);
|
||||
gst_object_unref (sinkpad);
|
||||
|
@ -616,7 +616,7 @@ initable_init (GInitable *initable,
|
|||
if (gst_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK) {
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"Failed to link rtpbin to rtpsink");
|
||||
return FALSE;
|
||||
goto err;
|
||||
}
|
||||
gst_object_unref (srcpad);
|
||||
gst_object_unref (sinkpad);
|
||||
|
@ -627,7 +627,7 @@ initable_init (GInitable *initable,
|
|||
if (gst_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK) {
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"Failed to link rtpbin to rtcpsink");
|
||||
return FALSE;
|
||||
goto err;
|
||||
}
|
||||
gst_object_unref (srcpad);
|
||||
gst_object_unref (sinkpad);
|
||||
|
@ -638,12 +638,18 @@ initable_init (GInitable *initable,
|
|||
if (gst_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK) {
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
"Failed to link rtcpsrc to rtpbin");
|
||||
return FALSE;
|
||||
goto err;
|
||||
}
|
||||
gst_object_unref (srcpad);
|
||||
gst_object_unref (sinkpad);
|
||||
|
||||
return TRUE;
|
||||
|
||||
err:
|
||||
gst_object_unref (srcpad);
|
||||
gst_object_unref (sinkpad);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue