mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 11:01:19 +00:00
qemuMonitorJSONQueryFdsetsParse: Don't check value passed to g_strdup
'g_strdup()' is NULL-tolerant. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
2a80ae1b30
commit
6e433cc8df
@ -3695,7 +3695,6 @@ qemuMonitorJSONQueryFdsetsParse(virJSONValue *msg,
|
|||||||
|
|
||||||
for (i = 0; i < ninfo; i++) {
|
for (i = 0; i < ninfo; i++) {
|
||||||
size_t j;
|
size_t j;
|
||||||
const char *tmp;
|
|
||||||
virJSONValue *fdarray;
|
virJSONValue *fdarray;
|
||||||
qemuMonitorFdsetInfo *fdsetinfo = &sets->fdsets[i];
|
qemuMonitorFdsetInfo *fdsetinfo = &sets->fdsets[i];
|
||||||
|
|
||||||
@ -3734,9 +3733,7 @@ qemuMonitorJSONQueryFdsetsParse(virJSONValue *msg,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* opaque is optional and may be missing */
|
/* opaque is optional and may be missing */
|
||||||
tmp = virJSONValueObjectGetString(fdentry, "opaque");
|
fdinfo->opaque = g_strdup(virJSONValueObjectGetString(fdentry, "opaque"));
|
||||||
if (tmp)
|
|
||||||
fdinfo->opaque = g_strdup(tmp);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user