summaryrefslogtreecommitdiffstats
path: root/sys-utils/eject.c
diff options
context:
space:
mode:
authorSami Kerola2012-04-05 22:40:48 +0200
committerKarel Zak2012-04-10 12:21:37 +0200
commit92091356f9c905b754b11acab595d10192eda3d7 (patch)
tree9e7e399a56bfedb0295a8d86c98c4f6a752bb3aa /sys-utils/eject.c
parenteject: inform why open failed (diff)
downloadkernel-qcow2-util-linux-92091356f9c905b754b11acab595d10192eda3d7.tar.gz
kernel-qcow2-util-linux-92091356f9c905b754b11acab595d10192eda3d7.tar.xz
kernel-qcow2-util-linux-92091356f9c905b754b11acab595d10192eda3d7.zip
eject: close open file [cppcheck]
[eject.c:498]: (error) Resource leak: f Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/eject.c')
-rw-r--r--sys-utils/eject.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys-utils/eject.c b/sys-utils/eject.c
index aa45c181c..5aec0baa7 100644
--- a/sys-utils/eject.c
+++ b/sys-utils/eject.c
@@ -521,6 +521,7 @@ static int read_speed(const char *devname)
errx(EXIT_FAILURE,
_("%s: failed to read speed"),
_PATH_PROC_CDROMINFO);
+ fclose(f);
return atoi(str);
}
}