mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-11-23 18:14:25 +08:00
e2fsck: add error-checking when unlink tdb file for dir_info
Fixes-Coverity-Bug: 1308365 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
c5fbc536b5
commit
0abe5745b6
@ -326,7 +326,9 @@ void e2fsck_free_dir_info(e2fsck_t ctx)
|
||||
if (ctx->dir_info->tdb)
|
||||
tdb_close(ctx->dir_info->tdb);
|
||||
if (ctx->dir_info->tdb_fn) {
|
||||
unlink(ctx->dir_info->tdb_fn);
|
||||
if (unlink(ctx->dir_info->tdb_fn) < 0)
|
||||
com_err("e2fsck_free_dir_info", errno,
|
||||
_("while freeing dir_info tdb file"));
|
||||
free(ctx->dir_info->tdb_fn);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user