projects
/
deliverable
/
babeltrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d41a84
)
Fix: Only close valid fds in is_valid_debug_file
author
Michael Jeanson
<mjeanson@efficios.com>
Tue, 17 May 2016 19:43:59 +0000
(15:43 -0400)
committer
Jérémie Galarneau
<jeremie.galarneau@efficios.com>
Mon, 30 May 2016 05:59:38 +0000
(
01:59
-0400)
Fixes coverity #
1354901
and #
1354902
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
lib/bin-info.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/bin-info.c
b/lib/bin-info.c
index 55808eb0abb0675f5e9c809b53975597965a6252..93bca2a87db88759aa100cded48c24a6bbf9097d 100644
(file)
--- a/
lib/bin-info.c
+++ b/
lib/bin-info.c
@@
-329,12
+329,12
@@
int is_valid_debug_file(char *path, uint32_t crc)
uint32_t _crc = 0;
if (!path) {
- goto end;
+ goto end
_noclose
;
}
fd = open(path, O_RDONLY);
if (fd < 0) {
- goto end;
+ goto end
_noclose
;
}
ret = crc32(fd, &_crc);
@@
-347,6
+347,7
@@
int is_valid_debug_file(char *path, uint32_t crc)
end:
close(fd);
+end_noclose:
return ret;
}
This page took
0.025674 seconds
and
5
git commands to generate.