On 11/02/2011 06:28 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange"<berrange@xxxxxxxxxx> * src/qemu/qemu_driver.c: Fix use of uninitialized 'params' --- src/qemu/qemu_driver.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f81cb88..3194e6b 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -7236,6 +7236,7 @@ qemuDomainBlockStatsFlags(virDomainPtr dom, } if (tmp< *nparams&& wr_req != -1) { + param =¶ms[tmp]; if (virStrcpyStatic(param->field, VIR_DOMAIN_BLOCK_STATS_WRITE_REQ) == NULL) { qemuReportError(VIR_ERR_INTERNAL_ERROR, @@ -7249,6 +7250,7 @@ qemuDomainBlockStatsFlags(virDomainPtr dom, } if (tmp< *nparams&& rd_bytes != -1) { + param =¶ms[tmp]; if (virStrcpyStatic(param->field, VIR_DOMAIN_BLOCK_STATS_READ_BYTES) == NULL) { qemuReportError(VIR_ERR_INTERNAL_ERROR, @@ -7262,6 +7264,7 @@ qemuDomainBlockStatsFlags(virDomainPtr dom, } if (tmp< *nparams&& rd_req != -1) { + param =¶ms[tmp]; if (virStrcpyStatic(param->field, VIR_DOMAIN_BLOCK_STATS_READ_REQ) == NULL) { qemuReportError(VIR_ERR_INTERNAL_ERROR, @@ -7275,6 +7278,7 @@ qemuDomainBlockStatsFlags(virDomainPtr dom, } if (tmp< *nparams&& flush_req != -1) { + param =¶ms[tmp]; if (virStrcpyStatic(param->field, VIR_DOMAIN_BLOCK_STATS_FLUSH_REQ) == NULL) { qemuReportError(VIR_ERR_INTERNAL_ERROR, @@ -7288,6 +7292,7 @@ qemuDomainBlockStatsFlags(virDomainPtr dom, } if (tmp< *nparams&& wr_total_times != -1) { + param =¶ms[tmp]; if (virStrcpyStatic(param->field, VIR_DOMAIN_BLOCK_STATS_WRITE_TOTAL_TIMES) == NULL) { qemuReportError(VIR_ERR_INTERNAL_ERROR, @@ -7301,6 +7306,7 @@ qemuDomainBlockStatsFlags(virDomainPtr dom, } if (tmp< *nparams&& rd_total_times != -1) { + param =¶ms[tmp]; if (virStrcpyStatic(param->field, VIR_DOMAIN_BLOCK_STATS_READ_TOTAL_TIMES) == NULL) { qemuReportError(VIR_ERR_INTERNAL_ERROR, @@ -7314,6 +7320,7 @@ qemuDomainBlockStatsFlags(virDomainPtr dom, } if (tmp< *nparams&& flush_total_times != -1) { + param =¶ms[tmp]; if (virStrcpyStatic(param->field, VIR_DOMAIN_BLOCK_STATS_READ_TOTAL_TIMES) == NULL) { qemuReportError(VIR_ERR_INTERNAL_ERROR,
ACK -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list