module-tunnel: Fix double free
authorKimJeongYeon <jeongyeon.kim@samsung.com>
Wed, 6 Jan 2016 08:28:11 +0000 (17:28 +0900)
committerArun Raghavan <git@arunraghavan.net>
Thu, 7 Jan 2016 12:29:15 +0000 (17:59 +0530)
Local pointer 'dn' freed again when pa_thread_new() failed.

Signed-off-by: KimJeongYeon <jeongyeon.kim@samsung.com>
src/modules/module-tunnel.c

index 833423a58b97b6d8a9a878e84194038ffbc9b5c6..53c440225a856fc44417ad287dd335bed53ea1d9 100644 (file)
@@ -2200,8 +2200,6 @@ int pa__init(pa_module*m) {
     u->mcalign = pa_mcalign_new(pa_frame_size(&u->source->sample_spec));
 #endif
 
-    pa_xfree(dn);
-
     u->time_event = NULL;
 
     u->maxlength = (uint32_t) -1;
@@ -2222,6 +2220,8 @@ int pa__init(pa_module*m) {
     pa_source_put(u->source);
 #endif
 
+    pa_xfree(dn);
+
     if (server)
         pa_xfree(server);