Skip to content

Commit

Permalink
Fix: ctf: query.c: Unchecked fclose() return value
Browse files Browse the repository at this point in the history
Coverity report:
  CID 1382583 (#1 of 1): Unchecked return value (CHECKED_RETURN)12.
  check_return: Calling fclose without checking return value (as is done
  elsewhere 9 out of 11 times).

Reported-by: Coverity (1382583) Unchecked return value
Signed-off-by: Francis Deslauriers <[email protected]>
Change-Id: Ic5f7d46992b823bcb0571853da4ca23dcefe3d35
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2207
CI-Build: Jonathan Rajotte Julien <[email protected]>
Tested-by: jenkins <[email protected]>
Reviewed-by: Simon Marchi <[email protected]>
  • Loading branch information
frdeso authored and jgalar committed Oct 17, 2019
1 parent 791f305 commit a7d6bdf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/plugins/ctf/fs-src/query.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,11 @@ bt_component_class_query_method_status metadata_info_query(
ctf_metadata_decoder_destroy(decoder);
if (metadata_fp) {
fclose(metadata_fp);
ret = fclose(metadata_fp);
if (ret) {
BT_LOGE_ERRNO("Cannot close metatada file stream",
": path=\"%s\"", path);
}
}
*user_result = result;
Expand Down

0 comments on commit a7d6bdf

Please sign in to comment.