stream: Fix a couple of format_info leaks
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Sat, 18 Jun 2011 18:35:41 +0000 (11:35 -0700)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Mon, 20 Jun 2011 00:46:35 +0000 (17:46 -0700)
src/pulse/stream.c

index cd5182a..4c754b7 100644 (file)
@@ -303,7 +303,10 @@ static void stream_free(pa_stream *s) {
         pa_smoother_free(s->smoother);
 
     for (i = 0; i < s->n_formats; i++)
-        pa_xfree(s->req_formats[i]);
+        pa_format_info_free(s->req_formats[i]);
+
+    if (s->format)
+        pa_format_info_free(s->format);
 
     pa_xfree(s->device_name);
     pa_xfree(s);