Memory leak in cephwrap_realpath (vfs_ceph.c)

David Disseldorp ddiss at samba.org
Mon May 7 09:11:42 UTC 2018


Hi Vandana,

On Sun, 6 May 2018 16:53:30 +0000, Rungta, Vandana via samba-technical wrote:

> There are a couple of memory leak issues in cephwrap_realpath in vfs_ceph.c
> 
> 
>   1.  “result” is double allocated by  SMB_MALLOC_ARRAY and by asprintf .
>   2.  The error code paths for r < 0 need to SAFE_FREE “result”.

Thanks for the report, your analysis looks correct to me.
Could you please resend your patch as an attachment or git pull URL, as
the inline version seems to be malformed.
Also, please add your sign-off to the commit.

Cheers, David



More information about the samba-technical mailing list