projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a9b449
)
printf: don't leak serialised pointer extension strings
author
Tim-Philipp Müller
<tim@centricular.net>
Sun, 7 Apr 2013 16:21:10 +0000
(17:21 +0100)
committer
Tim-Philipp Müller
<tim.muller@collabora.co.uk>
Fri, 12 Apr 2013 22:05:57 +0000
(23:05 +0100)
gst/printf/vasnprintf.c
patch
|
blob
|
history
diff --git
a/gst/printf/vasnprintf.c
b/gst/printf/vasnprintf.c
index
315688c
..
f20d3bc
100644
(file)
--- a/
gst/printf/vasnprintf.c
+++ b/
gst/printf/vasnprintf.c
@@
-260,10
+260,15
@@
vasnprintf (char *resultbuf, size_t * lengthp, const char *format, va_list args)
errno = EINVAL;
return NULL;
}
-#define CLEANUP() \
- free (d.dir); \
- if (a.arg) \
- free (a.arg);
+#define CLEANUP() \
+ free (d.dir); \
+ if (a.arg) { \
+ while (a.count--) { \
+ if (a.arg[a.count].ext_string) \
+ free (a.arg[a.count].ext_string); \
+ } \
+ free (a.arg); \
+ }
if (printf_fetchargs (args, &a) < 0) {
CLEANUP ();