aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools/vppapigen/vppapigen_c.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/vppapigen/vppapigen_c.py')
-rw-r--r--src/tools/vppapigen/vppapigen_c.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/vppapigen/vppapigen_c.py b/src/tools/vppapigen/vppapigen_c.py
index 66e0c2f084c..0727619a803 100644
--- a/src/tools/vppapigen/vppapigen_c.py
+++ b/src/tools/vppapigen/vppapigen_c.py
@@ -553,7 +553,7 @@ class FromJSON():
write(' item = cJSON_GetObjectItem(o, "{}");\n'
.format(t.fieldname))
- write(' if (!item) return 0;\n')
+ write(' if (!item) { free(a); return 0; }\n')
self._dispatch[t.type](self, t, toplevel=True)
write('\n')