card-restore: Fix memory leak 02/227002/1 accepted/tizen/unified/20200310.151127 submit/tizen/20200309.043014
authorSangchul Lee <sc11.lee@samsung.com>
Mon, 9 Mar 2020 03:33:22 +0000 (12:33 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Mon, 9 Mar 2020 03:42:09 +0000 (12:42 +0900)
[Version] 13.0-3
[Issue Type] Coverity defect

Change-Id: If6a5f8a7acedc0b6be5acf9ce270f8757ab6529c
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/pulseaudio.spec
src/modules/module-card-restore.c

index b4bb81f..d51b9ab 100644 (file)
@@ -3,7 +3,7 @@
 Name:             pulseaudio
 Summary:          Improved Linux sound server
 Version:          13.0
-Release:          2
+Release:          3
 Group:            Multimedia/Audio
 License:          LGPL-2.1
 URL:              http://pulseaudio.org
index 25598f7..ee91f0f 100644 (file)
@@ -561,7 +561,14 @@ static pa_hook_result_t card_choose_initial_profile_callback(pa_core *core, pa_c
     if (!u->restore_bluetooth_profile) {
         const char *s = pa_proplist_gets(card->proplist, PA_PROP_DEVICE_BUS);
         if (pa_safe_streq(s, "bluetooth"))
+#ifdef __TIZEN__
+        {
+            entry_free(e);
             return PA_HOOK_OK;
+        }
+#else
+            return PA_HOOK_OK;
+#endif
     }
 
     if (e->profile[0]) {