[PATCH 3/3] repair/slab.c: avoid to use NULL pointer

zhanchengbin
2022-06-06T12:34:11Z

Changed malloc to xmalloc.

Signed-off-by: zhanchengbin <zhanchengbin1@huawei.com>
---
repair/slab.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/repair/slab.c b/repair/slab.c
index 165f97ef..13fc8203 100644
--- a/repair/slab.c
+++ b/repair/slab.c
@@ -237,7 +237,7 @@ qsort_slab(
create_work_queue(&wq, NULL, platform_nproc());
hdr = slab->s_first;
while (hdr) {
- qs = malloc(sizeof(struct qsort_slab));
+ qs = xmalloc(sizeof(struct qsort_slab));
qs->slab = slab;
qs->hdr = hdr;
qs->compare_fn = compare_fn;
--
2.27.0