aboutsummaryrefslogtreecommitdiff
path: root/lib/libedit/tokenizer.c
diff options
context:
space:
mode:
authorStefan Farfeleder <stefanf@FreeBSD.org>2005-08-07 08:35:39 +0000
committerStefan Farfeleder <stefanf@FreeBSD.org>2005-08-07 08:35:39 +0000
commit969f70013850f952bf41a8abfe728f632b6fd5fb (patch)
treed825b4f4f7523e559e5839c88fab7eaae33f735e /lib/libedit/tokenizer.c
parente000e0011875e76478b1a705bdb8a83835e4eedb (diff)
Revert the replacement of realloc() with reallocf() (el.h:1.2, map.c:1.5 and
tokenizer.c:1.3). Contrary to the commit log there were no memory leaks, but the change introduced a bug because the free'd pointer was not zeroed and calling the appropriate _end() function would call free() a second time.
Notes
Notes: svn path=/head/; revision=148814
Diffstat (limited to 'lib/libedit/tokenizer.c')
-rw-r--r--lib/libedit/tokenizer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libedit/tokenizer.c b/lib/libedit/tokenizer.c
index 8c7ae8e36ca4..463a980bcad6 100644
--- a/lib/libedit/tokenizer.c
+++ b/lib/libedit/tokenizer.c
@@ -65,7 +65,6 @@ typedef enum {
#define tok_malloc(a) malloc(a)
#define tok_free(a) free(a)
#define tok_realloc(a, b) realloc(a, b)
-#define tok_reallocf(a, b) reallocf(a, b)
struct tokenizer {
@@ -386,7 +385,7 @@ tok_line(Tokenizer *tok, const char *line, int *argc, char ***argv)
if (tok->argc >= tok->amax - 4) {
char **p;
tok->amax += AINCR;
- p = (char **) tok_reallocf(tok->argv,
+ p = (char **) tok_realloc(tok->argv,
tok->amax * sizeof(char *));
if (p == NULL)
return (-1);