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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Changed malloc to xmalloc.

Signed-off-by: zhanchengbin <zhanchengbin1@xxxxxxxxxx>
---
 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




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux