From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11837 Path: news.gmane.org!.POSTED!not-for-mail From: Shiz Newsgroups: gmane.linux.lib.musl.general Subject: Re: gethostbyname2.c / 6476b8135760659b25c93ff9308425ca98a9e777 breaking asterisk 13 compatibility Date: Thu, 24 Aug 2017 14:47:04 +0200 Message-ID: References: <1503574748.12219.16.camel@wwcom.ch> <1503574813.12219.17.camel@wwcom.ch> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: multipart/signed; boundary="Apple-Mail=_7F891F5B-D4C8-4567-8283-A97EA5F0374E"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Trace: blaine.gmane.org 1503578856 30123 195.159.176.226 (24 Aug 2017 12:47:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 24 Aug 2017 12:47:36 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-11850-gllmg-musl=m.gmane.org@lists.openwall.com Thu Aug 24 14:47:33 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1dkrXg-0007D2-8E for gllmg-musl@m.gmane.org; Thu, 24 Aug 2017 14:47:24 +0200 Original-Received: (qmail 20174 invoked by uid 550); 24 Aug 2017 12:47:28 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 20156 invoked from network); 24 Aug 2017 12:47:28 -0000 In-Reply-To: <1503574813.12219.17.camel@wwcom.ch> X-Mailer: Apple Mail (2.3273) Xref: news.gmane.org gmane.linux.lib.musl.general:11837 Archived-At: --Apple-Mail=_7F891F5B-D4C8-4567-8283-A97EA5F0374E Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii >> Second: I'm currently debugging a strange memory corruption problem >> and >> have just had a look at the gethostbyname2.c code: >> >> I was wondering: why is it safe to do free(h) on the initial run when >> *h has not been >> >> static struct hostent *h; >> size_t size = 63; >> struct hostent *res; >> int err; >> do { >> free(h); >> >> Best regards, >> >> Pirmin h is defined as having static storage, as such its initial value is NULL. free(NULL) is valid. - Shiz --Apple-Mail=_7F891F5B-D4C8-4567-8283-A97EA5F0374E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJZnsrUAAoJEI8YjKeZk+kHMCoQAMiiezY8BWQe2EclCA3mka7C XilmmZ2vZMxGtlqu2Mb+zy8hg/cY7ni6bYbavvtt6LhOd/lH7VEghLub4SIQSlbT SfqybO4mp5pGHZeNMUePUhduhCcbU1eqSvpDRmy+J7ViTjghg4QB4Ft/Izdpyoh9 rZeainp0J82OXfJyMTFJOEJhBSqX9WBE1oGiqMl7NWkSx77kG68BT3rirKgvRWdU yWPBLS6ewmbbpExPvjMf33fnwjtPHe7zPkHVJirAZilFkjRYO58Y3+5/ZNme8NdZ VoSi/b713pVOpofRWtfc7XGomF7svaCqhd7ZKFezc/apvgtR4AycGuURFiEFBKT6 NKUjVbNdeCqsY0Sp2MpnNkWp8qgLO8XCPZSq5SxX+FXjwPYpWOMqGFkI/J8ON09M vvdUp/iQIcqfxmDoeavew/xwox5i3SdXS9ikEDJjT0ah+UI3bI01N90Bdw+hPZkW SAm2+QlAPTcYSG62lyTireTZ8nS5Z4HJvP0oq8QcWGTUqpBV11fPoeKex/HqyScz eRZwHbrgc+d9WYFeZtVdbfAonZTD/gaY/t/4qRNPHYMFSXbdrgd4tUTXpWWzlral 8wTUslG3DUeY6Dky0AppYAJMwk28WKJK6RPvkY4Nsnccz8yQmQwvX0WctoOzsA6Q Lg/x4VnYXEvmYADtKT1M =bK3k -----END PGP SIGNATURE----- --Apple-Mail=_7F891F5B-D4C8-4567-8283-A97EA5F0374E--