Message ID | 1526658340-1992-9-git-send-email-thuth@redhat.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40nXbn5dDBz9s29 for <incoming@patchwork.ozlabs.org>; Sat, 19 May 2018 01:47:01 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40nXbn4RWFzF2J8 for <incoming@patchwork.ozlabs.org>; Sat, 19 May 2018 01:47:01 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=redhat.com (client-ip=66.187.233.73; helo=mx1.redhat.com; envelope-from=thuth@redhat.com; receiver=<UNKNOWN>) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40nXZX2KHFzF2Cj for <slof@lists.ozlabs.org>; Sat, 19 May 2018 01:45:56 +1000 (AEST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3C7AF401EF14; Fri, 18 May 2018 15:45:54 +0000 (UTC) Received: from thh440s.redhat.com (ovpn-116-82.ams2.redhat.com [10.36.116.82]) by smtp.corp.redhat.com (Postfix) with ESMTP id 315C183B67; Fri, 18 May 2018 15:45:52 +0000 (UTC) From: Thomas Huth <thuth@redhat.com> To: slof@lists.ozlabs.org Date: Fri, 18 May 2018 17:45:37 +0200 Message-Id: <1526658340-1992-9-git-send-email-thuth@redhat.com> In-Reply-To: <1526658340-1992-1-git-send-email-thuth@redhat.com> References: <1526658340-1992-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Fri, 18 May 2018 15:45:54 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Fri, 18 May 2018 15:45:54 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'thuth@redhat.com' RCPT:'' Subject: [SLOF] [PATCH v2 08/11] libc: Check for NULL pointers in free() X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" <slof.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/slof>, <mailto:slof-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/slof/> List-Post: <mailto:slof@lists.ozlabs.org> List-Help: <mailto:slof-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/slof>, <mailto:slof-request@lists.ozlabs.org?subject=subscribe> Cc: Greg Kurz <groug@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" <slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> |
Series |
Support network booting with pxelinux.cfg files
|
expand
|
diff --git a/lib/libc/stdlib/free.c b/lib/libc/stdlib/free.c index 9005450..d276585 100644 --- a/lib/libc/stdlib/free.c +++ b/lib/libc/stdlib/free.c @@ -19,8 +19,10 @@ free(void *ptr) { struct chunk *header; + if (!ptr) + return; + header = (struct chunk *) ptr; header--; header->inuse = 0; - }