On 06/18/2013 10:05 AM, Jiri Denemark wrote:
---
src/libvirt.c | 177 +++++++++++++++++++++++++++++++++++++++++++---------------
1 file changed, 133 insertions(+), 44 deletions(-)
<...snip...>
+ if (useParams) {
+ if (virTypedParamsGetString(params, nparams,
+ VIR_MIGRATE_PARAM_DEST_NAME, NULL) <= 0
&&
+ virTypedParamsReplaceString(¶ms, &nparams,
+ VIR_MIGRATE_PARAM_DEST_NAME,
+ domain->name) < 0) {
+ domain = NULL;
^^^ The setting of NULL right here causes Coverity problems later...
4979 virTypedParamsReplaceString(¶ms, &nparams,
4980 VIR_MIGRATE_PARAM_DEST_NAME,
4981 domain->name) < 0) {
(45) Event assign_zero: Assigning: "domain" = "NULL".
Also see events: [var_deref_op]
4982 domain = NULL;
+ } else {
+ ddomain = dconn->driver->domainMigrateFinish3Params
+ (dconn, params, nparams, cookiein, cookieinlen,
+ &cookieout, &cookieoutlen, destflags, cancelled);
+ }
+ } else {
+ dname = dname ? dname : domain->name;
+ ddomain = dconn->driver->domainMigrateFinish3
+ (dconn, dname, cookiein, cookieinlen, &cookieout, &cookieoutlen,
+ NULL, uri, destflags, cancelled);
+ }
/* If ddomain is NULL, then we were unable to start
* the guest on the target, and must restart on the
Later domain->conn is referenced:
(52) Event cond_true: Condition "notify_source", taking true branch
5017 if (notify_source) {
(53) Event var_deref_op: Dereferencing null pointer "domain".
Also see events: [assign_zero]
5018 VIR_DEBUG("Confirm3 %p ret=%d domain=%p", domain->conn, ret,
domain);
5019 VIR_FREE(cookiein);
5020 cookiein = cookieout;
John