From 1dca8bb7a24b3c7521b68205c1260a5329a52b74 Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Mon, 9 May 2011 19:49:52 +0000 Subject: Always free the multibyte->wchar conversion buffer allocated in __mbsconv(). ok matthew dcoppa miod --- lib/libc/stdio/vfwprintf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/libc/stdio/vfwprintf.c b/lib/libc/stdio/vfwprintf.c index f4b1f685bf8..b58985dd1ba 100644 --- a/lib/libc/stdio/vfwprintf.c +++ b/lib/libc/stdio/vfwprintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfwprintf.c,v 1.3 2011/04/28 17:38:46 stsp Exp $ */ +/* $OpenBSD: vfwprintf.c,v 1.4 2011/05/09 19:49:51 stsp Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -1051,6 +1051,8 @@ overflow: ret = -1; finish: + if (convbuf) + free(convbuf); #ifdef FLOATING_POINT if (dtoaresult) __freedtoa(dtoaresult); -- cgit v1.2.3