Fixed memory leak for lookahead buffer

This commit is contained in:
Christopher Haster
2017-04-29 12:50:23 -05:00
parent a30142e0e1
commit 6869b14694

4
lfs.c
View File

@@ -1502,6 +1502,10 @@ static int lfs_deinit(lfs_t *lfs) {
free(lfs->pcache.buffer); free(lfs->pcache.buffer);
} }
if (!lfs->cfg->lookahead_buffer) {
free(lfs->free.lookahead);
}
return 0; return 0;
} }