提交 31dbbb66 编写于 作者: D Daniel P. Berrange

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: NDaniel P. Berrange <berrange@redhat.com>
上级 377ac10c
...@@ -495,7 +495,7 @@ elsif ($mode eq "server") { ...@@ -495,7 +495,7 @@ elsif ($mode eq "server") {
push(@args_list, "args->$1.$1_len"); push(@args_list, "args->$1.$1_len");
} elsif ($args_member =~ m/^remote_typed_param (\S+)<(\S+)>;/) { } elsif ($args_member =~ m/^remote_typed_param (\S+)<(\S+)>;/) {
push(@vars_list, "virTypedParameterPtr $1 = NULL"); push(@vars_list, "virTypedParameterPtr $1 = NULL");
push(@vars_list, "int n$1"); push(@vars_list, "int n$1 = 0;");
if ($call->{ProcName} eq "NodeSetMemoryParameters") { if ($call->{ProcName} eq "NodeSetMemoryParameters") {
push(@args_list, "priv->conn"); push(@args_list, "priv->conn");
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册