qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] vfio/iommufd: Fix memory leak


From: Cédric Le Goater
Subject: Re: [PATCH] vfio/iommufd: Fix memory leak
Date: Thu, 14 Mar 2024 09:22:00 +0100
User-agent: Mozilla Thunderbird

On 3/14/24 04:31, Duan, Zhenzhong wrote:


-----Original Message-----
From: Cédric Le Goater <clg@redhat.com>
Sent: Thursday, March 14, 2024 5:06 AM
To: qemu-devel@nongnu.org
Cc: Alex Williamson <alex.williamson@redhat.com>; Cédric Le Goater
<clg@redhat.com>; Eric Auger <eric.auger@redhat.com>; Liu, Yi L
<yi.l.liu@intel.com>; Duan, Zhenzhong <zhenzhong.duan@intel.com>
Subject: [PATCH] vfio/iommufd: Fix memory leak

Make sure variable contents is freed if scanf fails.

Cc: Eric Auger <eric.auger@redhat.com>
Cc: Yi Liu <yi.l.liu@intel.com>
Cc: Zhenzhong Duan <zhenzhong.duan@intel.com>
Fixes: CID 1540007
Fixes: 5ee3dc7af785 ("vfio/iommufd: Implement the iommufd backend")
Signed-off-by: Cédric Le Goater <clg@redhat.com>

Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>

Unrelated to this patch, I see there are four g_free calls, not clear if it's 
deserved
to cleanup with g_autofree.

Ah yes. This is much better indeed.


Thanks,

C.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]