[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] modules: fix some small memory leaks

Arun Raghavan gitlab at gitlab.freedesktop.org
Tue Jun 16 13:01:48 UTC 2020



Arun Raghavan pushed to branch master at PulseAudio / pulseaudio


Commits:
9315bbdf by Wim Taymans at 2020-06-16T12:40:39+02:00
modules: fix some small memory leaks

- - - - -


2 changed files:

- src/modules/module-card-restore.c
- src/modules/module-null-sink.c


Changes:

=====================================
src/modules/module-card-restore.c
=====================================
@@ -562,7 +562,7 @@ 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"))
-            return PA_HOOK_OK;
+            goto finish;
     }
 
     if (e->profile[0]) {
@@ -582,6 +582,7 @@ static pa_hook_result_t card_choose_initial_profile_callback(pa_core *core, pa_c
         }
     }
 
+finish:
     entry_free(e);
 
     return PA_HOOK_OK;


=====================================
src/modules/module-null-sink.c
=====================================
@@ -343,8 +343,10 @@ int pa__init(pa_module*m) {
 
             if (!format) {
                 pa_log(_("Failed to set format: invalid format string %s"), f);
+		pa_xfree(f);
                 goto fail;
             }
+            pa_xfree(f);
 
             pa_idxset_put(u->formats, format, NULL);
         }



View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/9315bbdfe5c2987bc1501653f9672f79a6f9ee6d

-- 
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/9315bbdfe5c2987bc1501653f9672f79a6f9ee6d
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20200616/0ed25d36/attachment-0001.htm>


More information about the pulseaudio-commits mailing list