projects
/
platform
/
upstream
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d81891a
)
More scrubbing
author
Eric Andersen
<andersen@codepoet.org>
Mon, 19 Nov 2001 10:59:37 +0000
(10:59 -0000)
committer
Eric Andersen
<andersen@codepoet.org>
Mon, 19 Nov 2001 10:59:37 +0000
(10:59 -0000)
findutils/grep.c
patch
|
blob
|
history
diff --git
a/findutils/grep.c
b/findutils/grep.c
index
b98b724
..
7c1e0f6
100644
(file)
--- a/
findutils/grep.c
+++ b/
findutils/grep.c
@@
-223,9
+223,10
@@
static void destroy_regexes()
/* destroy all the elments in the array */
while (--nregexes >= 0) {
- regfree(
&
regexes[nregexes]);
+ regfree(regexes[nregexes]);
}
- free(regexes);
+ if (regexes)
+ free(regexes);
}
#endif
@@
-239,8
+240,7
@@
extern int grep_main(int argc, char **argv)
#ifdef CONFIG_FEATURE_CLEAN_UP
/* destroy command strings on exit */
- if (atexit(destroy_regexes) == -1)
- perror_msg_and_die("atexit");
+ atexit(destroy_regexes);
#endif
#ifdef CONFIG_FEATURE_GREP_EGREP_ALIAS