mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
util: json: check return value of virJSONValueFromJsonC
In virJSONValueFromJsonC, the return value of virJSONValueFromJsonC was not checked in one case. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
13f40898ab
commit
da66bf53b0
@ -1437,6 +1437,11 @@ virJSONValueFromJsonC(json_object *jobj)
|
||||
|
||||
cur = virJSONValueFromJsonC(val);
|
||||
|
||||
if (!cur) {
|
||||
g_free(ret);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
virJSONValueArrayAppend(ret, &cur);
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user