Re: [PATCH v1 4/5] dmaengine: idxd: fix memory leak in error handling path of idxd_alloc

From: Shuai Xue
Date: Fri Feb 14 2025 - 21:04:56 EST




在 2025/2/15 01:01, Dave Jiang 写道:


On 1/10/25 1:22 AM, Shuai Xue wrote:
Memory allocated for idxd is not freed if an error occurs during
idxd_alloc(). To fix it, free the allocated memory in the reverse order
of allocation before exiting the function in case of an error.

Signed-off-by: Shuai Xue <xueshuai@xxxxxxxxxxxxxxxxx>

Reviewed-by: Dave Jiang <dave.jiang@xxxxxxxxx>

I received two Reviewed-by from you for this patch, is this (the second) for
Patch 5/5.

Thanks.
Shuai