Przeglądaj źródła

Fixed memory leak for lookahead buffer

Christopher Haster 8 lat temu
rodzic
commit
6869b14694
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      lfs.c

+ 4 - 0
lfs.c

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