Skip to content

Commit 76b19ad

Browse files
luca020400Steve Kondik
authored and
Steve Kondik
committed
f2fs_utils: Alloc f2fs_journal
* Fixes encryption Change-Id: I542ae946bdc44d9c2e9c2dcfd50bbbf40f647b4b
1 parent 650a24c commit 76b19ad

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

f2fs_utils/f2fs_sparseblock.c

+10
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,13 @@ struct f2fs_info *generate_f2fs_info(int fd)
388388
return NULL;
389389
}
390390

391+
info->journal = calloc(1, sizeof(struct f2fs_journal));
392+
if (!info->journal) {
393+
SLOGE("Out of memory!");
394+
free(info);
395+
return NULL;
396+
}
397+
391398
sb = malloc(sizeof(*sb));
392399
if(!sb) {
393400
SLOGE("Out of memory!");
@@ -463,6 +470,9 @@ void free_f2fs_info(struct f2fs_info *info)
463470

464471
free(info->sit_sums);
465472
info->sit_sums = NULL;
473+
474+
free(info->journal);
475+
info->journal = NULL;
466476
}
467477
free(info);
468478
}

0 commit comments

Comments
 (0)