summaryrefslogtreecommitdiffstats
path: root/trunk/src/verify.c
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/src/verify.c')
-rw-r--r--trunk/src/verify.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/trunk/src/verify.c b/trunk/src/verify.c
index 935cbc2..7945ced 100644
--- a/trunk/src/verify.c
+++ b/trunk/src/verify.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Red Hat, Inc.
+/* Copyright (C) 2002, 2003, 2006 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2002.
This program is free software; you can redistribute it and/or modify
@@ -289,17 +289,17 @@ prelink_verify (const char *filename)
dso2 = fdopen_dso (fd, filename);
if (dso2 == NULL)
- goto failure;
+ goto failure_unlink;
fd = -1;
if (prelink_prepare (dso2))
- goto failure;
+ goto failure_unlink;
if (ent->type == ET_DYN && relocate_dso (dso2, base))
- goto failure;
+ goto failure_unlink;
if (prelink (dso2, ent))
- goto failure;
+ goto failure_unlink;
unlink (ent->filename);
@@ -414,6 +414,8 @@ prelink_verify (const char *filename)
close (fdundone);
return 0;
+failure_unlink:
+ unlink (ent->filename);
failure:
if (fd != -1)
close (fd);