This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Commit: Close memory leaks in chew
- From: Nick Clifton <nickc at redhat dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: binutils at sourceware dot org
- Date: Mon, 8 Aug 2016 15:23:20 +0100
- Subject: Re: Commit: Close memory leaks in chew
- Authentication-results: sourceware.org; auth=none
- References: <87h9avpkyn.fsf@redhat.com> <mvm37mfwk6z.fsf@hawking.suse.de>
Hi Andreas,
>> - free (buffer->ptr);
>> + if (buffer->ptr)
>> + free (buffer->ptr);
>
> free (0) is a no-op.
OK - I will remember that for the future. I doubt if it really matters
here, since the performance penalty of the test is trivial.
Cheers
Nick