summaryrefslogtreecommitdiffstats
path: root/src/vat2/jsonconvert.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vat2/jsonconvert.c')
-rw-r--r--src/vat2/jsonconvert.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vat2/jsonconvert.c b/src/vat2/jsonconvert.c
index fa41e7988e2..d62cda1091c 100644
--- a/src/vat2/jsonconvert.c
+++ b/src/vat2/jsonconvert.c
@@ -69,7 +69,8 @@ int
u8string_fromjson2(cJSON *o, char *fieldname, u8 *data)
{
u8 *s = u8string_fromjson(o, fieldname);
- if (!s) return 0;
+ if (!s)
+ return -1;
memcpy(data, s, vec_len(s));
vec_free(s);
return 0;