Fix resource leak

This commit is contained in:
mayeut 2015-09-25 00:39:05 +02:00
parent b9ca882749
commit 4da7e9617f
1 changed files with 2 additions and 0 deletions

View File

@ -361,6 +361,7 @@ int get_num_images(char *imgdirpath){
continue;
num_images++;
}
closedir(dir);
return num_images;
}
@ -387,6 +388,7 @@ int load_images(dircnt_t *dirptr, char *imgdirpath){
strcpy(dirptr->filename[i],content->d_name);
i++;
}
closedir(dir);
return 0;
}