projects
/
project
/
ubox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ubox: Fix some memory leaks
[project/ubox.git]
/
validate
/
validate.c
diff --git
a/validate/validate.c
b/validate/validate.c
index
5bc3bc4
..
0628407
100644
(file)
--- 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"))
{