From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by sourceware.org (Postfix) with ESMTPS id DAE4F3858002 for ; Fri, 17 Jun 2022 09:01:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DAE4F3858002 Received: by mail-oi1-x22d.google.com with SMTP id h65so4278120oia.11 for ; Fri, 17 Jun 2022 02:01:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oXenrtvi9igWfPzGTp9lEhg64GoiVKusPG1VQoPtUso=; b=h81sJeGYTPPMad+b4JJthcnRDa/6y2h0y9UCj2K3IfzTo32VsWk7Z2wI+1hAOcQ+oO yL9DAP2eylCrxXHUX6wHsk+3X93dnL7koxYioWmkFPPJCav3yJxtKLycyMvg0MHHJFfU 7XliawBpMcceaVb3B+ckTNOTNFLijvSZWQYztnbpNIMQe6HcJguPUIWtmY5Fo0q4dtYv f2n+9VOBDHsgFTsBl/KGCI5YJtYAbEbKAGwm3RZQLKqjT2LbRDv0TkWMH1zg6CDXxDJK szYqg2vVJM2mHbQ7pEB39UDPib0wzYjBvVQpJe4g3l680hpWE5SboV1F666pTDgWWpu7 ZQDw== X-Gm-Message-State: AOAM53078Kx9Wo5oDXc0sG8M22hfGVoCaP8x5piRDmZu9/+s/wVn1ZLX Ay5nwkV4kSNz+aBS3X3bigzzdthWz2zbjvNkFbQRTbVnq4g= X-Google-Smtp-Source: ABdhPJzm5tRQmitIDSDC2GbjS1h256n0bWSwuDRGKq0Ics+v1rsW1U1t3mpMfLiPpO1H8gRN094AZN1Yc3SeadUZB2U= X-Received: by 2002:a05:6808:1644:b0:2f7:4de5:3c53 with SMTP id az4-20020a056808164400b002f74de53c53mr9662341oib.225.1655456510312; Fri, 17 Jun 2022 02:01:50 -0700 (PDT) MIME-Version: 1.0 References: <20220607212342.671687-1-brainbomb@gmail.com> In-Reply-To: From: Marcus Nilsson Date: Fri, 17 Jun 2022 11:01:34 +0200 Message-ID: Subject: Re: [PATCH] readelf: Replace xmalloc with malloc in slurp_relr_relocs To: Jan Beulich Cc: binutils@sourceware.org X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2022 09:01:52 -0000 Thank you for you reply. Since I don't have push permissions, feel free to commit this one if no one disapproves. Thanks, Marcus Nilsson On Wed, Jun 8, 2022 at 8:11 AM Jan Beulich wrote: > On 07.06.2022 23:23, Marcus Nilsson via Binutils wrote: > > Using xmalloc makes the null check redundant since failing allocation > > will exit the program. Instead use malloc and let the error be > > conveyed up the call chain. > > > > binutils/ChangeLog: > > * readelf.c: (slurp_relr_relocs) Use malloc instead of xmalloc > > when allocating space for relocations. > > OK. > > Jan > > -- Marcus Nilsson - tel: +46(0)704911844 mail: marcus@landmarknilsson.se github: github.com/metmo linkedin: linkedin.com/in/landmarknilsson