ldrdf: Remove output file if there are any errors

If there are any errors while linking, we should not create an
output file.

Signed-off-by: Daniel Lundqvist <daniel@malarhojden.nu>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
Daniel Lundqvist 2016-10-04 10:53:19 +02:00 committed by H. Peter Anvin
parent ce63783e85
commit 439875c1d9

View file

@ -1398,7 +1398,9 @@ int main(int argc, char **argv)
write_output(outname);
if (errorcount > 0)
if (errorcount > 0) {
remove(outname);
exit(1);
}
return 0;
}