X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=lib%2Fbin-info.c;h=93bca2a87db88759aa100cded48c24a6bbf9097d;hp=55808eb0abb0675f5e9c809b53975597965a6252;hb=6ce6949a64c320786c7ca458034681b43c2c20f0;hpb=c862350b39e4d95750bbb627497d3768d87817ff diff --git a/lib/bin-info.c b/lib/bin-info.c index 55808eb0..93bca2a8 100644 --- 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; }