mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
rpc: Don't use unrelated value as privateData of client
Append privateData of the client only if there are any, otherwise the previous value (socket data) will get there again. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
404094187a
commit
2128d2e920
@ -536,13 +536,14 @@ virJSONValuePtr virNetServerClientPreExecRestart(virNetServerClientPtr client)
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (client->privateData && client->privateDataPreExecRestart &&
|
||||
!(child = client->privateDataPreExecRestart(client, client->privateData)))
|
||||
goto error;
|
||||
if (client->privateData && client->privateDataPreExecRestart) {
|
||||
if (!(child = client->privateDataPreExecRestart(client, client->privateData)))
|
||||
goto error;
|
||||
|
||||
if (virJSONValueObjectAppend(object, "privateData", child) < 0) {
|
||||
virJSONValueFree(child);
|
||||
goto error;
|
||||
if (virJSONValueObjectAppend(object, "privateData", child) < 0) {
|
||||
virJSONValueFree(child);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
virObjectUnlock(client);
|
||||
|
Loading…
x
Reference in New Issue
Block a user