[pulseaudio-commits] src/modules
Tanu Kaskinen
tanuk at kemper.freedesktop.org
Wed Jan 29 10:56:56 PST 2014
src/modules/module-card-restore.c | 1 +
1 file changed, 1 insertion(+)
New commits:
commit c95b4c22caeb69552406395ee6472ed308301ff2
Author: Tanu Kaskinen <tanu.kaskinen at linux.intel.com>
Date: Wed Jan 29 20:54:39 2014 +0200
card-restore: Fix a memory leak
entry_read() may set entry->profile, so we need to free that string
before we can replace it with a new string.
diff --git a/src/modules/module-card-restore.c b/src/modules/module-card-restore.c
index 252dcce..5b02602 100644
--- a/src/modules/module-card-restore.c
+++ b/src/modules/module-card-restore.c
@@ -390,6 +390,7 @@ static pa_hook_result_t card_profile_changed_callback(pa_core *c, pa_card *card,
return PA_HOOK_OK;
if ((entry = entry_read(u, card->name))) {
+ pa_xfree(entry->profile);
entry->profile = pa_xstrdup(card->active_profile->name);
pa_log_info("Storing card profile for card %s.", card->name);
} else {
More information about the pulseaudio-commits
mailing list