diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-06-05 07:57:27 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-06-05 07:57:27 +0000 |
commit | f94e5d78b06d2641e08d61f48c100eb205f5ac0a (patch) | |
tree | 8ee6afc85258918b0efe63d7482039e1a27d146f | |
parent | d1813a007f2343402d1de883403278f91da1ab53 (diff) | |
download | zsh-f94e5d78b06d2641e08d61f48c100eb205f5ac0a.tar.gz zsh-f94e5d78b06d2641e08d61f48c100eb205f5ac0a.tar.xz zsh-f94e5d78b06d2641e08d61f48c100eb205f5ac0a.zip |
some more memory leak fixes (11745)
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/Modules/parameter.c | 5 | ||||
-rw-r--r-- | Src/Zle/compresult.c | 2 | ||||
-rw-r--r-- | Src/builtin.c | 2 |
4 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index 0ffdc0e85..fec260648 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-06-05 Sven Wischnowsky <wischnow@zsh.org> + + * 11745: Src/builtin.c, Src/Modules/parameter.c, Src/Zle/compresult.c: + some more memory leak fixes + 2000-06-04 Bart Schaefer <schaefer@zsh.org> * 11743: Completion/Linux/_rpm: Complete http as well as ftp URLs diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c index bdced0680..d7c3ba690 100644 --- a/Src/Modules/parameter.c +++ b/Src/Modules/parameter.c @@ -192,9 +192,10 @@ scanpmparameters(HashTable ht, ScanFunc func, int flags) static void setpmcommand(Param pm, char *value) { - if (isset(RESTRICTED)) + if (isset(RESTRICTED)) { zwarn("restricted: %s", value, 0); - else { + zsfree(value); + } else { Cmdnam cn = zcalloc(sizeof(*cn)); cn->flags = HASHED; diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c index 1e807a93d..7e2e564f1 100644 --- a/Src/Zle/compresult.c +++ b/Src/Zle/compresult.c @@ -1168,7 +1168,7 @@ void comp_list(char *v) { zsfree(complist); - complist = ztrdup(v); + complist = v; onlyexpl = (v ? ((strstr(v, "expl") ? 1 : 0) | (strstr(v, "messages") ? 2 : 0)) : 0); diff --git a/Src/builtin.c b/Src/builtin.c index 560855b9e..e6e89faef 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -2162,7 +2162,7 @@ mkautofn(Shfunc shf) p->strs = NULL; p->shf = shf; p->npats = 0; - p->pats = NULL; + p->pats = (Patprog *) p->prog; p->flags = EF_REAL; p->dump = NULL; |