提交 94f26f01 编写于 作者: P Peter Krempa

remoteDispatchDomainMigratePrepare*: Don't pass uninitialized variable to VIR_FREE

'uri_out' may be passed to VIR_FREE uninitialized if 'conn' is NULL.
Unfortunately the compiler isn't able to detect this problem when
VIR_FREE is implemented using g_clear_pointer. Initialize the variable.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com
上级 c5c0dc3c
......@@ -3030,7 +3030,7 @@ remoteDispatchDomainMigratePrepare(virNetServerPtr server G_GNUC_UNUSED,
char *cookie = NULL;
int cookielen = 0;
char *uri_in;
char **uri_out;
char **uri_out = NULL;
char *dname;
int rv = -1;
virConnectPtr conn = remoteGetHypervisorConn(client);
......@@ -3082,7 +3082,7 @@ remoteDispatchDomainMigratePrepare2(virNetServerPtr server G_GNUC_UNUSED,
char *cookie = NULL;
int cookielen = 0;
char *uri_in;
char **uri_out;
char **uri_out = NULL;
char *dname;
int rv = -1;
virConnectPtr conn = remoteGetHypervisorConn(client);
......@@ -4789,7 +4789,7 @@ remoteDispatchDomainMigratePrepare3(virNetServerPtr server G_GNUC_UNUSED,
char *cookieout = NULL;
int cookieoutlen = 0;
char *uri_in;
char **uri_out;
char **uri_out = NULL;
char *dname;
int rv = -1;
virConnectPtr conn = remoteGetHypervisorConn(client);
......@@ -5584,7 +5584,7 @@ remoteDispatchDomainMigratePrepare3Params(virNetServerPtr server G_GNUC_UNUSED,
int nparams = 0;
char *cookieout = NULL;
int cookieoutlen = 0;
char **uri_out;
char **uri_out = NULL;
int rv = -1;
virConnectPtr conn = remoteGetHypervisorConn(client);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册