Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
vppapigen: resource leakage in fromjson array - coverity
[vpp.git]
/
src
/
tools
/
vppapigen
/
vppapigen_c.py
diff --git
a/src/tools/vppapigen/vppapigen_c.py
b/src/tools/vppapigen/vppapigen_c.py
index
759d332
..
a83d361
100644
(file)
--- a/
src/tools/vppapigen/vppapigen_c.py
+++ b/
src/tools/vppapigen/vppapigen_c.py
@@
-380,7
+380,7
@@
class FromJSON():
int i;
cJSON *array = cJSON_GetObjectItem(o, "{n}");
int size = cJSON_GetArraySize(array);
- if (size != {lfield})
return 0
;
+ if (size != {lfield})
goto error
;
for (i = 0; i < size; i++) {{
cJSON *e = cJSON_GetArrayItem(array, i);
{call}