summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
Diffstat (limited to 'audio')
-rw-r--r--audio/manager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/audio/manager.c b/audio/manager.c
index 87dd4b01..1512218f 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -229,7 +229,6 @@ static DBusHandlerResult am_remove_headset(DBusMessage *msg)
path = match->data;
headsets = g_slist_remove(headsets, path);
- g_free(path);
if (default_hs == path) {
if (!headsets)
@@ -245,6 +244,8 @@ static DBusHandlerResult am_remove_headset(DBusMessage *msg)
headset_remove(path);
+ g_free(path);
+
return send_message_and_unref(connection, reply);
}