summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/variable.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/variable.c b/src/variable.c
index 333daeb..8e75ea2 100644
--- a/src/variable.c
+++ b/src/variable.c
@@ -169,12 +169,15 @@ symtab_remove(struct symtab *st, const char *name)
169 break; 169 break;
170 if (++i >= hash_size[st->hash_num]) 170 if (++i >= hash_size[st->hash_num])
171 i = 0; 171 i = 0;
172 if (i == pos) 172 if (i == pos)
173 return ENOENT; 173 return ENOENT;
174 } 174 }
175
176 if (!entry)
177 return ENOENT;
175 178
176 var_free(entry); 179 var_free(entry);
177 180
178 for (;;) { 181 for (;;) {
179 st->tab[i] = NULL; 182 st->tab[i] = NULL;
180 j = i; 183 j = i;

Return to:

Send suggestions and report system problems to the System administrator.