webrtcsdp: Fix memory leaks
authorSangchul Lee <sc11.lee@samsung.com>
Wed, 16 Dec 2020 02:52:22 +0000 (11:52 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Wed, 16 Dec 2020 03:02:20 +0000 (12:02 +0900)
[Version] 1.16.2-5
[Profile] Common
[Issue Type] Bug fix (SVACE)

Change-Id: I3d60ac5e2cb6b89065edab44ab9139b4e2b442fa
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
ext/webrtc/webrtcsdp.c
packaging/gst-plugins-bad.spec

index 715391b..5a08c82 100644 (file)
@@ -436,6 +436,9 @@ _media_replace_direction (GstSDPMedia * media,
       GST_TRACE ("replace %s with %s", attr->key, dir_str);
       gst_sdp_attribute_set (&new_attr, dir_str, "");
       gst_sdp_media_replace_attribute (media, i, &new_attr);
+#ifdef __TIZEN__
+      g_free (dir_str);
+#endif
       return;
     }
   }
@@ -561,6 +564,9 @@ _media_replace_setup (GstSDPMedia * media, GstWebRTCDTLSSetup setup)
       GST_TRACE ("replace setup:%s with setup:%s", attr->value, setup_str);
       gst_sdp_attribute_set (&new_attr, "setup", setup_str);
       gst_sdp_media_replace_attribute (media, i, &new_attr);
+#ifdef __TIZEN__
+      g_free (setup_str);
+#endif
       return;
     }
   }
index ce88768..0b876aa 100644 (file)
@@ -4,7 +4,7 @@
 
 Name:           gst-plugins-bad
 Version:        1.16.2
-Release:        4
+Release:        5
 Summary:        GStreamer Streaming-Media Framework Plug-Ins
 License:        LGPL-2.0+
 Group:          Multimedia/Framework
@@ -85,6 +85,7 @@ export CFLAGS+=" -Wall -g -fPIC\
   -DTIZEN_FEATURE_OALSINK_MODIFICATION\
   -DTIZEN_FEATURE_MPEGDEMUX_MODIFICATION\
   -DTIZEN_FEATURE_UPSTREAM\
+  -D__TIZEN__\
   -fstack-protector-strong\
   -Wl,-z,relro\
   -D_FORTIFY_SOURCE=2"