Whamcloud - gitweb
libsupport: avoid possible null dereference in quota_set_sb_inum()
authorzhanchengbin <zhanchengbin1@huawei.com>
Fri, 31 Dec 2021 07:42:17 +0000 (15:42 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 12 May 2022 00:56:42 +0000 (20:56 -0400)
commited54397b414def44d8ef11b4e320d9809d5fa294
treea8345ae7dfe46d775d10f0fd3d7c67766c512a19
parent1c966c9dffef7e823a020a2f3982e9b9b1953e8b
libsupport: avoid possible null dereference in quota_set_sb_inum()

If the quota type is invalid, quota_sb_inump will return NULL; this
should not cause the program to crash.

Link: https://lore.kernel.org/r/ee0b034c-71f3-63b7-a8de-d8e7760b9545@huawei.com
Signed-off-by: zhanchengbin <zhanchengbin1@huawei.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/support/mkquota.c