Add 'g_object_unref' for 'address' variable. 66/172466/2
authorHyunsoo Park <hance.park@samsung.com>
Wed, 14 Mar 2018 05:48:04 +0000 (14:48 +0900)
committerHyunsoo Park <hance.park@samsung.com>
Wed, 14 Mar 2018 06:20:48 +0000 (06:20 +0000)
For type checking whether 'address' is 'G_TYPE_INET_SOCKET_ADDRESS' type, it is used 'G_IS_INET_SOCKET_aDDRESS' api.
And in case of taking false, 'address' is not null because it is passed null checking.
So i added 'g_object_unref' in else statement.

Change-Id: I49f8a3d6d7c320d0d49ef073088690a4dd026d29
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
gst/rtsp-server/rtsp-client.c

index 178ce51..26c8ace 100644 (file)
@@ -3853,6 +3853,7 @@ gst_rtsp_client_set_connection (GstRTSPClient * client,
   } else {
     priv->is_ipv6 = g_socket_get_family (read_socket) == G_SOCKET_FAMILY_IPV6;
     priv->server_ip = g_strdup ("unknown");
+    g_object_unref (address);
   }
 
   GST_INFO ("client %p connected to server ip %s, ipv6 = %d", client,