]> git.sesse.net Git - vlc/commitdiff
aout: fix improbable memory leak
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 28 Feb 2013 16:02:27 +0000 (18:02 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 28 Feb 2013 16:02:27 +0000 (18:02 +0200)
src/audio_output/output.c

index 30f33960346f03a33e6cbc72c45bf995da71e2e3..60c0d3b9f09fe89275f7c4ec8f82c862dc6ae04a 100644 (file)
@@ -599,6 +599,8 @@ int aout_DeviceSet (audio_output_t *aout, const char *id)
     }
 
     vlc_mutex_lock (&owner->req.lock);
+    if (owner->req.device != unset_str)
+        free (owner->req.device);
     owner->req.device = dev;
     vlc_mutex_unlock (&owner->req.lock);