This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] vfprintf: Fix memory with large width and precision [BZ #19931]
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: Florian Weimer <fweimer at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 11 Apr 2016 08:52:32 -0700
- Subject: Re: [PATCH] vfprintf: Fix memory with large width and precision [BZ #19931]
- Authentication-results: sourceware.org; auth=none
- References: <570BC02D dot 2040901 at redhat dot com>
On 04/11/2016 08:18 AM, Florian Weimer wrote:
+ /* Deallocate any previously allocated buffer because it is
+ too small. */
+ if (workstart != NULL)
+ {
+ free (workstart);
+ workstart = NULL;
+ }
Other places in that function use this code instead:
if (__glibc_unlikely (workstart != NULL))
free (workstart);
workstart = NULL;
Is there some reason to do things differently here?