diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/module.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 1c00076d4..b65cc2e6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-05-29 Peter Stephenson <p.w.stephenson@ntlworld.com> + + * unposted: Src/module.c: failure adding autoload builtin + didn't clean up properly. + 2007-05-29 Peter Stephenson <pws@csr.com> * 23488: README, Etc/zsh-development-guide, Src/builtin.c, diff --git a/Src/module.c b/Src/module.c index c837193e8..05a0d402a 100644 --- a/Src/module.c +++ b/Src/module.c @@ -202,7 +202,11 @@ add_autobin(char *nam, char *module) Builtin bn = zshcalloc(sizeof(*bn)); bn->node.nam = ztrdup(nam); bn->optstr = ztrdup(module); - return addbuiltin(bn); + if (addbuiltin(bn)) { + builtintab->freenode(&bn->node); + return 1; + } + return 0; } /* Remove the builtin added previously by addbuiltin(). Returns * |