I think there is a memory leak here ...

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Jul 17 00:54:58 MDT 2013


On Tue, Jul 16, 2013 at 05:41:54PM -0700, Richard Sharpe wrote:
> Hi folks,
> 
> I think the following is needed:
> 
> diff --git a/source3/smbd/notify_inotify.c b/source3/smbd/notify_inotify.c
> index 4e9a87e..efb659f 100644
> --- a/source3/smbd/notify_inotify.c
> +++ b/source3/smbd/notify_inotify.c
> @@ -398,6 +398,7 @@ NTSTATUS inotify_watch(struct sys_notify_context *ctx,
>         if (w->path == NULL) {
>                 inotify_rm_watch(in->fd, wd);
>                 *filter = orig_filter;
> +               TALLOC_FREE(w);
>                 return NT_STATUS_NO_MEMORY;
>         }

Yep, correct. Consider this reviewed-by me.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de


More information about the samba-technical mailing list