Fix memory leak in error code path.
authorRichard Sharpe <realrichardsharpe@gmail.com>
Wed, 17 Jul 2013 23:29:39 +0000 (16:29 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 18 Jul 2013 01:22:37 +0000 (03:22 +0200)
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jul 18 03:22:37 CEST 2013 on sn-devel-104

source3/smbd/notify_inotify.c

index 4e9a87e6f9fbaa2cfbe031797dd9d8ca1804d29d..efb659f7c07addd20dd2762cecb54ba463cafe25 100644 (file)
@@ -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;
        }