diff options
Diffstat (limited to 'validate')
-rw-r--r-- | validate/validate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/validate/validate.c b/validate/validate.c index 5bc3bc4..0628407 100644 --- a/validate/validate.c +++ b/validate/validate.c @@ -173,8 +173,10 @@ dt_type_list(struct dt_state *s, int nargs) char *p, *str = strdup(s->value); const char *value = s->value; - if (!str || !nargs) + if (!str || !nargs) { + free(str); return false; + } for (p = strtok(str, " \t"); p; p = strtok(NULL, " \t")) { |