mirror of https://gitee.com/openkylin/libvirt.git
commandtest: Resolve Coverity RESOURCE_LEAK
Since '62f263a73' - Coverity complains if the !pidfile path is taken, then newfd1 would be leaked.
This commit is contained in:
parent
b9ff7393bc
commit
e1d0471e58
tests
|
@ -1081,6 +1081,7 @@ static int test24(const void *unused ATTRIBUTE_UNUSED)
|
|||
unlink(pidfile);
|
||||
VIR_FREE(pidfile);
|
||||
virCommandFree(cmd);
|
||||
VIR_FORCE_CLOSE(newfd1);
|
||||
/* coverity[double_close] */
|
||||
VIR_FORCE_CLOSE(newfd2);
|
||||
VIR_FORCE_CLOSE(newfd3);
|
||||
|
|
Loading…
Reference in New Issue