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:
parent
ce63783e85
commit
439875c1d9
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue