[PATCH 05/17] Regex: Avoid memory leaks.
Paul Eggert
eggert@cs.ucla.edu
Tue Dec 19 22:37:00 GMT 2017
On 12/08/2017 01:16 AM, Arnold Robbins wrote:
> + if (new_array_start != NULL)
> + re_free(new_array_start);
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:
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=9e849a708308b73064cd965de022d357e3abda80
which is already installed in Gnulib.
More information about the Libc-alpha
mailing list