From 620e8de52ad4b48adeb296681f46385f209b0f71 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 1 Jun 2021 12:43:08 +0200 Subject: [PATCH] acp: copy the db_fix key as well Or else we will try to free the original key twice and segfault. Fixes #1125 --- spa/plugins/alsa/acp/alsa-mixer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/spa/plugins/alsa/acp/alsa-mixer.c b/spa/plugins/alsa/acp/alsa-mixer.c index 947ac6f73..f450b74be 100644 --- a/spa/plugins/alsa/acp/alsa-mixer.c +++ b/spa/plugins/alsa/acp/alsa-mixer.c @@ -3532,6 +3532,7 @@ finish: * object. */ e->db_fix = pa_xnewdup(pa_alsa_decibel_fix, db_fix, 1); e->db_fix->profile_set = NULL; + e->db_fix->key = pa_xstrdup(db_fix->key); e->db_fix->name = pa_xstrdup(db_fix->name); e->db_fix->db_values = pa_xmemdup(db_fix->db_values, (db_fix->max_step - db_fix->min_step + 1) * sizeof(long)); }