X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lib%2Fbin-info.c;h=65f9051fb00efe087c24c1fe9f66696cf081ebd1;hb=ffa3b3ba8c5868e27965c801d3986965ab35eed6;hp=55808eb0abb0675f5e9c809b53975597965a6252;hpb=7d41a84be695adf3a00858b7d43528f89e6cd4d9;p=babeltrace.git diff --git a/lib/bin-info.c b/lib/bin-info.c index 55808eb0..65f9051f 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; } @@ -1036,7 +1037,7 @@ int bin_info_child_die_has_address(struct bt_dwarf_die *die, uint64_t addr, bool goto error; } - if (contains) { + if (_contains) { goto end; } }