From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104027 invoked by alias); 11 Apr 2016 15:52:37 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 104016 invoked by uid 89); 11 Apr 2016 15:52:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: zimbra.cs.ucla.edu Subject: Re: [PATCH] vfprintf: Fix memory with large width and precision [BZ #19931] To: Florian Weimer , GNU C Library References: <570BC02D.2040901@redhat.com> From: Paul Eggert Message-ID: <570BC840.6060807@cs.ucla.edu> Date: Mon, 11 Apr 2016 15:52:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: <570BC02D.2040901@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2016-04/txt/msg00200.txt.bz2 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?