vppapigen: fix fromjson coverity errors in generation

Fix memory leak coverity errors where free was not called
on error conditions. Or called twice.

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I21cffa8b01e4f72f10501f202f6a762ae300a941
Signed-off-by: Ole Troan <ot@cisco.com>
diff --git a/src/vat2/test/vat2_test.api b/src/vat2/test/vat2_test.api
index 6a2c94d..fe96dd7 100644
--- a/src/vat2/test/vat2_test.api
+++ b/src/vat2/test/vat2_test.api
@@ -28,3 +28,14 @@
 autoreply define test_enum {
   vl_api_test_enumflags_t flags;
 };
+
+typedef test_stringtype {
+  string str[];
+};
+
+autoreply define test_string {
+  vl_api_test_stringtype_t str;
+};
+autoreply define test_string2 {
+  string str[];
+};