Add free code in failed case 50/163050/2
authorSeokHoon Lee <andy.shlee@samsung.com>
Thu, 7 Dec 2017 04:58:02 +0000 (13:58 +0900)
committerSeokHoon Lee <andy.shlee@samsung.com>
Thu, 7 Dec 2017 05:06:04 +0000 (14:06 +0900)
- In case of fail in create component,
  add free code for memory.

Signed-off-by: SeokHoon Lee <andy.shlee@samsung.com>
Change-Id: I7c2ee345d12a4b57b2d39b962382a786c99c6d8b

gst/rtsp-server/rtsp-client-wfd.c
gst/rtsp-server/rtsp-media-factory-wfd.c
packaging/gst-rtsp-server.spec

index 195b348..672e121 100644 (file)
@@ -1442,6 +1442,7 @@ handle_ts_response (GstRTSPWFDClient * client, GstRTSPContext * ctx)
   return res;
 
 error:
+  g_ptr_array_free (ta, FALSE);
   return GST_RTSP_ERROR;
 }
 
@@ -4238,8 +4239,8 @@ gst_rtsp_wfd_client_switch_to_udp (GstRTSPWFDClient * client)
   return res;
 
 error:
+  g_ptr_array_free (ta, FALSE);
   return res;
-
 }
 
 GstRTSPResult
@@ -4279,6 +4280,7 @@ gst_rtsp_wfd_client_switch_to_tcp (GstRTSPWFDClient * client)
   return res;
 
 error:
+  g_ptr_array_free (ta, FALSE);
   return res;
 }
 gchar * gst_rtsp_wfd_client_get_sink_user_agent (GstRTSPWFDClient * client)
index 5a0fc34..fd6373c 100644 (file)
@@ -703,6 +703,8 @@ _rtsp_media_factory_wfd_create_audio_capture_bin (GstRTSPMediaFactoryWFD *
   return TRUE;
 
 create_error:
+  gst_object_unref (acaps);
+  gst_object_unref (aqueue);
   if (acodec)
     g_free (acodec);
   if (audio_properties_name)
@@ -919,6 +921,8 @@ _rtsp_media_factory_wfd_create_waylandsrc_bin (GstRTSPMediaFactoryWFD * factory,
   return TRUE;
 
 create_error:
+  gst_object_unref (videosrc);
+  gst_object_unref (vqueue);
   return FALSE;
 }
 
@@ -1006,6 +1010,8 @@ _rtsp_media_factory_wfd_create_camera_capture_bin (GstRTSPMediaFactoryWFD *
   return TRUE;
 
 create_error:
+  gst_object_unref (videosrc);
+  gst_object_unref (vqueue);
   return FALSE;
 }
 
@@ -1213,6 +1219,8 @@ _rtsp_media_factory_wfd_create_xvcapture_bin (GstRTSPMediaFactoryWFD * factory,
   return TRUE;
 
 create_error:
+  gst_object_unref (videosrc);
+  gst_object_unref (vqueue);
   if (vcodec)
     g_free (vcodec);
   return FALSE;
index c6df3e1..982ba65 100644 (file)
@@ -1,7 +1,7 @@
 Name:       gst-rtsp-server
 Summary:    Multimedia Framework Library
 Version:    1.6.1
-Release:    22
+Release:    23
 Url:        http://gstreamer.freedesktop.org/
 Group:      System/Libraries
 License:    LGPL-2.0+