mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client->privateData && client->privateDataPreExecRestart &&
|
if (client->privateData && client->privateDataPreExecRestart) {
|
||||||
!(child = client->privateDataPreExecRestart(client, client->privateData)))
|
if (!(child = client->privateDataPreExecRestart(client, client->privateData)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (virJSONValueObjectAppend(object, "privateData", child) < 0) {
|
if (virJSONValueObjectAppend(object, "privateData", child) < 0) {
|
||||||
virJSONValueFree(child);
|
virJSONValueFree(child);
|
||||||
goto error;
|
goto error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virObjectUnlock(client);
|
virObjectUnlock(client);
|
||||||
|
Loading…
Reference in New Issue
Block a user