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; } }