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

Avoid leak in qemuParseRBDString on failure of qemuAddRBDHost

If qemuAddRBDHost fails due to parsing problems or OOM, then
qemuParseRBDString cleanup is skipped causing a memory leak.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 e7b7a201
......@@ -3404,9 +3404,9 @@ static int qemuParseRBDString(virDomainDiskDefPtr disk)
break;
}
}
if (qemuAddRBDHost(disk, h) < 0) {
return -1;
}
if (qemuAddRBDHost(disk, h) < 0)
goto error;
h = sep;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册