[pulseaudio-commits] r2313 - /branches/glitch-free/src/pulse/xmalloc.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Thu May 1 11:56:15 PDT 2008


Author: lennart
Date: Thu May  1 20:56:14 2008
New Revision: 2313

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2313&root=pulseaudio&view=rev
Log:
save errno before calling free()

Modified:
    branches/glitch-free/src/pulse/xmalloc.c

Modified: branches/glitch-free/src/pulse/xmalloc.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/pulse/xmalloc.c?rev=2313&root=pulseaudio&r1=2312&r2=2313&view=diff
==============================================================================
--- branches/glitch-free/src/pulse/xmalloc.c (original)
+++ branches/glitch-free/src/pulse/xmalloc.c Thu May  1 20:56:14 2008
@@ -29,6 +29,7 @@
 #include <signal.h>
 #include <unistd.h>
 #include <string.h>
+#include <errno.h>
 
 #include <pulse/gccmacro.h>
 #include <pulsecore/core-util.h>
@@ -123,8 +124,12 @@
 }
 
 void pa_xfree(void *p) {
+    int saved_errno;
+
     if (!p)
         return;
 
+    saved_errno = errno;
     free(p);
+    errno = saved_errno;
 }




More information about the pulseaudio-commits mailing list