diff --git a/bpc_sysCalls.c b/bpc_sysCalls.c index 8a20a97..cd799c7 100644 --- a/bpc_sysCalls.c +++ b/bpc_sysCalls.c @@ -1974,8 +1974,8 @@ DIR *bpc_opendir(const char *path) */ d->entrySize = entrySize; if ( bpc_attribCache_getDirEntries(&acNew, (char*)path, d->entries, d->entrySize) != d->entrySize ) { - free(d); free(d->entries); + free(d); return NULL; } d->entryIdx = 0;