From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-2.0 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_WEB,RP_MATCHES_RCVD shortcircuit=no autolearn=no autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 422B520899 for ; Mon, 14 Aug 2017 20:26:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751575AbdHNU0x (ORCPT ); Mon, 14 Aug 2017 16:26:53 -0400 Received: from mout.gmx.net ([212.227.17.20]:57333 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751098AbdHNU0w (ORCPT ); Mon, 14 Aug 2017 16:26:52 -0400 Received: from virtualbox ([37.201.192.198]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M82zV-1dLqr940zh-00vcDa; Mon, 14 Aug 2017 22:26:47 +0200 Date: Mon, 14 Aug 2017 22:26:45 +0200 (CEST) From: Johannes Schindelin X-X-Sender: virtualbox@virtualbox To: =?UTF-8?Q?Ren=C3=A9_Scharfe?= cc: Git List , Junio C Hamano Subject: Re: [PATCH] win32: plug memory leak on realloc() failure in syslog() In-Reply-To: <245410ce-1f4c-f2a9-fd8d-98ff2d2c0335@web.de> Message-ID: References: <245410ce-1f4c-f2a9-fd8d-98ff2d2c0335@web.de> User-Agent: Alpine 2.21.1 (DEB 209 2017-03-23) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-682565032-1502742406=:19382" X-Provags-ID: V03:K0:dfRJWhUOU7cIPmqfA9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PYXHyP6hQtWQeZ8VXsyrnaivljcp3Ti4= Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-682565032-1502742406=:19382 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Hi Ren=C3=A9, On Thu, 10 Aug 2017, Ren=C3=A9 Scharfe wrote: > If realloc() fails then the original buffer is still valid. Free it > before exiting the function. >=20 > Signed-off-by: Rene Scharfe The subject had me worried for a second... The realloc() fails so rarely that I, for one, have never encountered that problem. Still, it is a correct fix for a real bug. Thanks, Dscho --8323329-682565032-1502742406=:19382--