Skip to content

Commit

Permalink
decref json object if unable to access ibm OCC sensor file.
Browse files Browse the repository at this point in the history
  • Loading branch information
kfan326 authored Jul 13, 2023
1 parent d5c0d33 commit e8b4f3c
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 e8b4f3c

Please sign in to comment.