mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user