diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-04-20 12:15:20 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-04-20 12:15:20 +0000 |
commit | f5dcb96ae5e257efc4dc9cdd510119e9788d1228 (patch) | |
tree | ecc6395f031b09b64d179dfc5e98a350ffc488ce /audio/manager.c | |
parent | 4844b0c1d3a2f648b1c0957a3ef2551407be79b9 (diff) |
Free path string first when it is no longer needed
Diffstat (limited to 'audio/manager.c')
-rw-r--r-- | audio/manager.c | 3 |
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); } |