From d0aea64acc61d457bbca0cce6b8f510f42835994 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Sun, 5 Feb 2023 18:21:00 +0100 Subject: [PATCH] created & implemented OPENDIR --- src/core/lib/utils/memory.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/lib/utils/memory.c b/src/core/lib/utils/memory.c index feaa5e3..a734653 100644 --- a/src/core/lib/utils/memory.c +++ b/src/core/lib/utils/memory.c @@ -10,6 +10,7 @@ #include #include #include +#include #include @@ -18,7 +19,8 @@ enum POINTER_TYPES { ALLOCATION, FOPEN, - OPEN + OPEN, + OPENDIR }; typedef struct node @@ -160,6 +162,10 @@ void why2_free(void *pointer) case OPEN: //OPEN SYSTEM CALL close(*((int*) pointer)); break; + + case OPENDIR: //OPENDIR SYSTEM CALL + closedir(pointer); + break; } }