This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH 05/17] Regex: Avoid memory leaks.
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: Arnold Robbins <arnold at skeeve dot com>, carlos at redhat dot com, libc-alpha at sourceware dot org
- Date: Tue, 19 Dec 2017 14:37:35 -0800
- Subject: Re: [PATCH 05/17] Regex: Avoid memory leaks.
- Authentication-results: sourceware.org; auth=none
- References: <201712080916.vB89Gx7D005499@skeeve.com>
On 12/08/2017 01:16 AM, Arnold Robbins wrote:
+ if (new_array_start != NULL)
For this rarely-used code, it's better to omit the first line and simply
call re_free unconditionally, as this is simpler and likely will make
for fewer instructions in the executable. re_free will do the right
thing if new_array_start is NULL.
Aside from that, this patch is essentially the same as:
which is already installed in Gnulib.