[polypaudio-commits] r1004 - /trunk/src/polypcore/socket-client.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Fri Jun 2 14:06:39 PDT 2006


Author: lennart
Date: Fri Jun  2 23:06:38 2006
New Revision: 1004

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1004&root=polypaudio&view=rev
Log:
fix ugly access-after-free bug when doing asyncronous NS lookups

Modified:
    trunk/src/polypcore/socket-client.c

Modified: trunk/src/polypcore/socket-client.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polypcore/socket-client.c?rev=1004&root=polypaudio&r1=1003&r2=1004&view=diff
==============================================================================
--- trunk/src/polypcore/socket-client.c (original)
+++ trunk/src/polypcore/socket-client.c Fri Jun  2 23:06:38 2006
@@ -376,16 +376,18 @@
     
     asyncns_freeaddrinfo(res);
 
-    goto finish;
-
+    m->io_free(c->asyncns_io_event);
+    c->asyncns_io_event = NULL;
+    return;
+    
 fail:
+    m->io_free(c->asyncns_io_event);
+    c->asyncns_io_event = NULL;
+    
     errno = EHOSTUNREACH;
     do_call(c);
-    
-finish:
-    
-    m->io_free(c->asyncns_io_event);
-    c->asyncns_io_event = NULL;
+    return;
+    
 }
 
 #endif




More information about the pulseaudio-commits mailing list