diff options
Diffstat (limited to 'Src/module.c')
-rw-r--r-- | Src/module.c | 6 |
1 files changed, 5 insertions, 1 deletions
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 * |