Skip to content

Commit

Permalink
decref json object if unable to access ibm OCC sensor file. (#477)
Browse files Browse the repository at this point in the history
Co-authored-by: kfan326 <kfan326@gmail.com>
  • Loading branch information
slabasan and kfan326 authored Nov 8, 2023
1 parent 4592724 commit 1087bbf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/variorum/IBM/Power9.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ int ibm_cpu_p9_get_node_power_json(char **get_power_obj_str)
fd = open("/sys/firmware/opal/exports/occ_inband_sensors", O_RDONLY);
if (fd < 0)
{
json_decref(get_power_obj);
printf("Failed to open occ_inband_sensors file\n");
return -1;
}
Expand Down

0 comments on commit 1087bbf

Please sign in to comment.