1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

Fix BZ #18872 -- memory leak in printf_positional.

This commit is contained in:
Paul Pluzhnikov
2015-09-16 09:16:11 -07:00
parent 1f60740e5f
commit 560b04462f
5 changed files with 100 additions and 2 deletions

View File

@@ -2091,6 +2091,10 @@ printf_positional (_IO_FILE *s, const CHAR_T *format, int readonly_format,
- specs[nspecs_done].end_of_fmt);
}
all_done:
if (__glibc_unlikely (specs_malloced))
free (specs);
if (__glibc_unlikely (args_malloced != NULL))
free (args_malloced);
if (__glibc_unlikely (workstart != NULL))
free (workstart);
return done;