aboutsummaryrefslogtreecommitdiff
path: root/src/variable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/variable.c')
-rw-r--r--src/variable.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/variable.c b/src/variable.c
index e6bad1a..6b23c00 100644
--- a/src/variable.c
+++ b/src/variable.c
@@ -1,18 +1,18 @@
-/* This file is part of vmod-tbf
- Copyright (C) 2013-2015 Sergey Poznyakoff
+/* This file is part of vmod-variable
+ Copyright (C) 2013-2016 Sergey Poznyakoff
- Vmod-tbf is free software; you can redistribute it and/or modify
+ Vmod-variable is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
- Vmod-tbf is distributed in the hope that it will be useful,
+ Vmod-variable is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>.
+ along with vmod-variable. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdlib.h>
@@ -181,6 +181,9 @@ symtab_remove(struct symtab *st, const char *name)
if (i == pos)
return ENOENT;
}
+
+ if (!entry)
+ return ENOENT;
var_free(entry);
@@ -392,6 +395,7 @@ get_symtab(VARIABLE_CTX ctx)
if (symtabc <= fd) {
size_t n = fd + 1;
symtabv = realloc(symtabv, n * sizeof(symtabv[0]));
+ AN(symtabv);
while (symtabc < n)
symtabv[symtabc++] = NULL;
}

Return to:

Send suggestions and report system problems to the System administrator.