Skip to content

Commit

Permalink
lxfs: allocate memory for caching
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Oct 26, 2024
1 parent 2394a86 commit 6cec998
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fs/lxfs/src/mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ static Mountpoint *allocateMP() {
Mountpoint *mp = calloc(1, sizeof(Mountpoint));
if(!mp) return NULL;

mp->cache = calloc(CACHE_SIZE, sizeof(Cache));
if(!mp->cache) {
free(mp);
return NULL;
}

if(!mps) {
mps = mp;
return mp;
Expand Down

0 comments on commit 6cec998

Please sign in to comment.