Whamcloud - gitweb
argv_parse: check return value of malloc in argv_parse()
authorZhiqiang Liu <liuzhiqiang26@huawei.com>
Wed, 30 Jun 2021 08:27:19 +0000 (16:27 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 16 Jul 2021 03:41:20 +0000 (23:41 -0400)
commita61bc9e009b4b829f61f1717753b4ee0882d9aba
tree4c54f6b8de8dadc9415af95269c4465ec0758e69
parentaf03924f5b43b325a436d07ee1222f42e3aa96b6
argv_parse: check return value of malloc in argv_parse()

In argv_parse(), return value of malloc should be checked
whether it is NULL, otherwise, it may cause a segfault error.

Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Signed-off-by: Wu Guanghao <wuguanghao3@huawei.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/support/argv_parse.c