Whamcloud - gitweb
append_pathname: check the value returned by realloc
authorwuguanghao <wuguanghao3@huawei.com>
Wed, 30 Jun 2021 08:27:18 +0000 (16:27 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 16 Jul 2021 03:38:36 +0000 (23:38 -0400)
commitaf03924f5b43b325a436d07ee1222f42e3aa96b6
treef5749e6ec2f8946d1611cc3069cc3d9b1e494946
parentc3215a532441a9a397d1b12c63827e8f7233938b
append_pathname: check the value returned by realloc

In append_pathname(), we need to add a new path to save the value
returned by realloc, otherwise the name->path may be NULL, causing
a segfault.

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