mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-12 06:31:28 +00:00
Fix potential use of undefined variable in remote dispatch code
If an early dispatch check caused a jump to the 'cleanup' branch then virTypeParamsFree() would be called with an uninitialized 'nparams' variable. Fortunately 'params' is initialized to NULL, so the uninitialized 'nparams' variable would not be used. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> (cherry picked from commit 31dbbb667f7c711a18bd106358226685674c0605)
This commit is contained in:
parent
6381c1c130
commit
832049ca29
@ -495,7 +495,7 @@ elsif ($mode eq "server") {
|
||||
push(@args_list, "args->$1.$1_len");
|
||||
} elsif ($args_member =~ m/^remote_typed_param (\S+)<(\S+)>;/) {
|
||||
push(@vars_list, "virTypedParameterPtr $1 = NULL");
|
||||
push(@vars_list, "int n$1");
|
||||
push(@vars_list, "int n$1 = 0;");
|
||||
if ($call->{ProcName} eq "NodeSetMemoryParameters") {
|
||||
push(@args_list, "priv->conn");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user