diff options
author | Ole Troan <ot@cisco.com> | 2021-02-16 18:09:51 +0100 |
---|---|---|
committer | Neale Ranns <neale@graphiant.com> | 2021-02-17 08:08:08 +0000 |
commit | 93c4b1bb3f9c9e3871d51b0fd52d935555df2521 (patch) | |
tree | b326a99ae54715b36aea37bdb81cab6c7e319345 /src/vat2/jsonconvert.c | |
parent | 0a5b4c3fbfa1ec0699bc21b12a984836aadaa442 (diff) |
vppapigen: more _fromjson autogeneration coverity fixes
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I9a7bb617a3fa87d6ef49c75277e53425310cdcf9
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vat2/jsonconvert.c')
-rw-r--r-- | src/vat2/jsonconvert.c | 3 |
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; |