Coverity reported the following:
CID
1401211 (#1 of 1): Dereference after null check (FORWARD_NULL)4.
var_deref_op: Dereferencing null pointer bin.
Reported-by: Coverity - 1401211 Dereference after null check (FORWARD_NULL)
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I66c3dc42305b1c14a5567141274249c6e6b10082
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2050
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
- bt_fd_cache_put_handle(bin->fd_cache, dwarf_handle);
+ if (bin) {
+ bt_fd_cache_put_handle(bin->fd_cache, dwarf_handle);
+ }
dwarf_end(dwarf_info);
g_free(dwarf_info);
free(cu);
dwarf_end(dwarf_info);
g_free(dwarf_info);
free(cu);