projects
/
profile
/
ivi
/
pulseaudio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
caf742a
)
save errno before calling free()
author
Lennart Poettering
<lennart@poettering.net>
Thu, 1 May 2008 18:56:14 +0000
(18:56 +0000)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 1 May 2008 18:56:14 +0000
(18:56 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2313
fefdeb5f
-60dc-0310-8127-
8f9354f1896f
src/pulse/xmalloc.c
patch
|
blob
|
history
diff --git
a/src/pulse/xmalloc.c
b/src/pulse/xmalloc.c
index
2849097
..
a64761b
100644
(file)
--- a/
src/pulse/xmalloc.c
+++ b/
src/pulse/xmalloc.c
@@
-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
@@
char *pa_xstrndup(const char *s, size_t l) {
}
void pa_xfree(void *p) {
+ int saved_errno;
+
if (!p)
return;
+ saved_errno = errno;
free(p);
+ errno = saved_errno;
}