util: Fix memory leak in virPCIProbeStubDriver

Since 9ea90206, @drvpath could be overwritten if we jumped to recheck

Found by Coverity.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
John Ferlan 2020-06-16 08:07:05 -04:00 committed by Peter Krempa
parent 52e3c2b480
commit 16818ad4a3

View File

@ -1018,6 +1018,7 @@ virPCIProbeStubDriver(virPCIStubDriver driver)
goto cleanup;
}
VIR_FREE(drvpath);
goto recheck;
}