mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
printf: don't leak serialised pointer extension strings
This commit is contained in:
parent
9a9b449c5f
commit
6d8a6470d5
1 changed files with 9 additions and 4 deletions
|
@ -260,10 +260,15 @@ vasnprintf (char *resultbuf, size_t * lengthp, const char *format, va_list args)
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#define CLEANUP() \
|
#define CLEANUP() \
|
||||||
free (d.dir); \
|
free (d.dir); \
|
||||||
if (a.arg) \
|
if (a.arg) { \
|
||||||
free (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) {
|
if (printf_fetchargs (args, &a) < 0) {
|
||||||
CLEANUP ();
|
CLEANUP ();
|
||||||
|
|
Loading…
Reference in a new issue