More scrubbing
This commit is contained in:
parent
d81891a2e6
commit
55805bcba4
@ -223,9 +223,10 @@ static void destroy_regexes()
|
|||||||
|
|
||||||
/* destroy all the elments in the array */
|
/* destroy all the elments in the array */
|
||||||
while (--nregexes >= 0) {
|
while (--nregexes >= 0) {
|
||||||
regfree(®exes[nregexes]);
|
regfree(regexes[nregexes]);
|
||||||
}
|
}
|
||||||
free(regexes);
|
if (regexes)
|
||||||
|
free(regexes);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -239,8 +240,7 @@ extern int grep_main(int argc, char **argv)
|
|||||||
|
|
||||||
#ifdef CONFIG_FEATURE_CLEAN_UP
|
#ifdef CONFIG_FEATURE_CLEAN_UP
|
||||||
/* destroy command strings on exit */
|
/* destroy command strings on exit */
|
||||||
if (atexit(destroy_regexes) == -1)
|
atexit(destroy_regexes);
|
||||||
perror_msg_and_die("atexit");
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_FEATURE_GREP_EGREP_ALIAS
|
#ifdef CONFIG_FEATURE_GREP_EGREP_ALIAS
|
||||||
|
Loading…
Reference in New Issue
Block a user