[PATCH] vfprintf: Fix memory with large width and precision [BZ #19931]

Paul Eggert eggert@cs.ucla.edu
Mon Apr 11 15:52:00 GMT 2016


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?



More information about the Libc-alpha mailing list