mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +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++) {
|
||||
size_t j;
|
||||
const char *tmp;
|
||||
virJSONValue *fdarray;
|
||||
qemuMonitorFdsetInfo *fdsetinfo = &sets->fdsets[i];
|
||||
|
||||
@ -3734,9 +3733,7 @@ qemuMonitorJSONQueryFdsetsParse(virJSONValue *msg,
|
||||
}
|
||||
|
||||
/* opaque is optional and may be missing */
|
||||
tmp = virJSONValueObjectGetString(fdentry, "opaque");
|
||||
if (tmp)
|
||||
fdinfo->opaque = g_strdup(tmp);
|
||||
fdinfo->opaque = g_strdup(virJSONValueObjectGetString(fdentry, "opaque"));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user