]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/protocol-dbus.c
Use pa_hashmap_remove_and_free() where appropriate
[pulseaudio] / src / pulsecore / protocol-dbus.c
index c0d1ec463268e3f22bde3bb8957fe56169f10d04..cf4b9fc58b6a76c3cfe3b9829a6d378ba6d9c107 100644 (file)
@@ -993,8 +993,7 @@ void pa_dbus_protocol_add_signal_listener(
 
         /* Replace the old signal paths entry for this signal with a new
          * one. */
-        if ((signal_paths_entry = pa_hashmap_remove(conn_entry->listening_signals, signal_name)))
-            signal_paths_entry_free(signal_paths_entry);
+        pa_hashmap_remove_and_free(conn_entry->listening_signals, signal_name);
         signal_paths_entry = signal_paths_entry_new(signal_name);
 
         for (i = 0; i < n_objects; ++i)