summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/rpmfc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/build/rpmfc.c b/build/rpmfc.c
index 5c4893a8d..08d517233 100644
--- a/build/rpmfc.c
+++ b/build/rpmfc.c
@@ -1150,8 +1150,9 @@ static uint32_t getElfColor(const char *fn)
color = RPMFC_ELF32;
break;
}
- elf_end(elf);
}
+ if (elf)
+ elf_end(elf);
close(fd);
}
#endif