diff options
Diffstat (limited to 'src/data_management.c')
| -rw-r--r-- | src/data_management.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/data_management.c b/src/data_management.c index e27b9cd..1ee8134 100644 --- a/src/data_management.c +++ b/src/data_management.c @@ -223,6 +223,7 @@ struct list_head *get_data_from_directory(char *path) { if ((dir = opendir(path)) == NULL) { LOGERR("ERROR: Failed to open directory '%s': %s (errno %d)\n", path, strerror(errno), errno); + free(fullpath); return NULL; } @@ -230,6 +231,7 @@ struct list_head *get_data_from_directory(char *path) { if ((list = calloc(1, sizeof(struct list_head))) == NULL) { LOGERR("ERROR: Failed to allocate memory for list head.\n"); closedir(dir); + free(fullpath); return NULL; } |
