summaryrefslogtreecommitdiff
path: root/assemble.c
diff options
context:
space:
mode:
authorPhilipp Kloke <philipp.kloke@web.de>2013-03-31 12:02:30 +0200
committerCyrill Gorcunov <gorcunov@gmail.com>2013-04-01 02:16:27 +0400
commitdae212d049b1c6f737f14fe5c904adb6da432d8c (patch)
treecd721088e02362a5d5edb3f43828827aeb04bf0d /assemble.c
parentb432f5774123e20a210c473a85c102333514d1f1 (diff)
downloadnasm-dae212d049b1c6f737f14fe5c904adb6da432d8c.tar.gz
nasm-dae212d049b1c6f737f14fe5c904adb6da432d8c.tar.bz2
nasm-dae212d049b1c6f737f14fe5c904adb6da432d8c.zip
Fixed several resource and memory leaks
Bug found by: CppCheck 1.59 (static source analysis tool) Signed-off-by: Philipp Kloke <philipp.kloke@web.de> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'assemble.c')
-rw-r--r--assemble.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/assemble.c b/assemble.c
index 235be13..b119f86 100644
--- a/assemble.c
+++ b/assemble.c
@@ -424,6 +424,7 @@ int64_t assemble(int32_t segment, int64_t offset, int bits, uint32_t cp,
} else if (fseek(fp, 0L, SEEK_END) < 0) {
error(ERR_NONFATAL, "`incbin': unable to seek on file `%s'",
fname);
+ fclose(fp);
} else {
static char buf[4096];
size_t t = instruction->times;