summaryrefslogtreecommitdiff
path: root/drivers/ddr/imx/imx9
diff options
context:
space:
mode:
authorAlexander Dahl <ada@thorsis.com>2024-07-03 12:12:56 +0200
committerHeiko Schocher <hs@denx.de>2024-08-10 11:54:10 +0200
commit573dae50f5fe2c84ff8329bd8dbf54d234952579 (patch)
tree50b39c6e88e7e4869584d83d91294dcb0af3ad01 /drivers/ddr/imx/imx9
parentdf86e81f0a0fdcf958160e6fe3044f69a78df638 (diff)
fs: ubifs: Set pointers to NULL after free
Global superblock pointer 'ubifs_sb' and volume pointer 'ubi' of type struct ubi_volume_desc in private member sb->s_fs_info of type struct ubifs_info, can be allocated and freed at runtime, and allocated and freed again, depending which console or script commands are run. In some cases ubifs_sb is even tested to determine if the filesystem is mounted. Reset those pointers to NULL after free to clearly mark them as not valid. This avoids potential double free on invalid pointers. (The ubifs_sb pointer was already reset, but that statement was moved now to directly after the free() to make it easier to understand.) Signed-off-by: Alexander Dahl <ada@thorsis.com>
Diffstat (limited to 'drivers/ddr/imx/imx9')
0 files changed, 0 insertions, 0 deletions