]> Savannah Git Hosting - gnulib.git/commit
vasnprintf: Don't leak memory when memory allocation fails.
authorBruno Haible <bruno@clisp.org>
Sat, 5 Jun 2021 13:44:26 +0000 (15:44 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 5 Jun 2021 13:44:26 +0000 (15:44 +0200)
commit4d288a80bf7ebe29334b9805cdcc70eacb6059c1
treecaafe710caa933335251b0c659026b7552812550
parentf3553bdefc9202e81996c73686e3ca53cd827417
vasnprintf: Don't leak memory when memory allocation fails.

Found by Coverity. Reported by Mike Fabian <mfabian@redhat.com> in
<https://lists.gnu.org/archive/html/bug-libunistring/2021-06/msg00000.html>.

* lib/vasnprintf.c (VASNPRINTF): In places where a local variable points
to heap-allocated storage, free that storage before doing
'goto out_of_memory;'.
ChangeLog
lib/vasnprintf.c