mirror of https://gitee.com/openkylin/libvirt.git
qemuBuildChrDeviceCommandLine: Don't leak devstr
It's caller's responsibility to free return value of qemuBuildChrDeviceStr().
This commit is contained in:
parent
0f9e67bfad
commit
797b1ffce1
|
@ -6608,6 +6608,7 @@ qemuBuildChrDeviceCommandLine(virCommandPtr cmd,
|
|||
return -1;
|
||||
|
||||
virCommandAddArgList(cmd, "-device", devstr, NULL);
|
||||
VIR_FREE(devstr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue