temp_ptr should always be freed, even if the function is left via
goto fail.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
sizeof(struct ext2_inode));
if (ext4fs_put_metadata(temp_ptr, parent_itable_blkno))
goto fail;
- free(temp_ptr);
} else {
/*
* If parent and child fall in same inode table block
gd_index--;
if (ext4fs_put_metadata(temp_ptr, itable_blkno))
goto fail;
- free(temp_ptr);
}
ext4fs_update();
ext4fs_deinit();
fs->curr_inode_no = 0;
free(inode_buffer);
free(g_parent_inode);
+ free(temp_ptr);
g_parent_inode = NULL;
return 0;
ext4fs_deinit();
free(inode_buffer);
free(g_parent_inode);
+ free(temp_ptr);
g_parent_inode = NULL;
return -1;