summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Pereiaslov <perk11@perk11.info>2024-01-05 02:49:30 -0600
committerKonstantin Pereiaslov <perk11@perk11.info>2024-01-05 02:49:30 -0600
commit9b53b0f69624bda6a58532b355ef9ab3bf056942 (patch)
tree13a784cb5f1ecc4dbdb4d1dbafb52fe21b7bce5c
parentbb6d1690fdff58da60dd96799eb1144785bc0df3 (diff)
Add missing fclose() on proc stat file
-rw-r--r--process_handling.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/process_handling.c b/process_handling.c
index 627d34b..a38c4eb 100644
--- a/process_handling.c
+++ b/process_handling.c
@@ -88,6 +88,7 @@ pid_t read_parent_process_id(pid_t process_id) {
fprintf_error("Failed to read from %s\n", stat_file);
return 0;
}
+ fclose(stat_file);
const int MIN_STAT_FILE_READ_CLOSING_PARENTHESIS_POSITION =
1 //min PID length
+ 1//space