RE: [PATCH v2] vfio/iommufd: Fix memory leak

2024-03-14 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: [PATCH v2] vfio/iommufd: Fix memory leak > >Coverity reported a memory leak on variable 'contents' in routine >iommufd_cdev_getfd(). Use g_autofree variables to simplify the exit >path and get rid of g_

[PATCH v2] vfio/iommufd: Fix memory leak

2024-03-14 Thread Cédric Le Goater
Coverity reported a memory leak on variable 'contents' in routine iommufd_cdev_getfd(). Use g_autofree variables to simplify the exit path and get rid of g_free() calls. Cc: Eric Auger Cc: Yi Liu Fixes: CID 1540007 Fixes: 5ee3dc7af785 ("vfio/iommufd: Implement the iommufd backend") Suggested-by: