Fix a memleak in an unlikely error path in change_notify_create()
authorVolker Lendecke <vl@samba.org>
Thu, 9 Apr 2009 09:40:08 +0000 (11:40 +0200)
committerVolker Lendecke <vl@samba.org>
Sat, 11 Apr 2009 09:06:21 +0000 (11:06 +0200)
source3/smbd/notify.c

index dc1599b46291d1c09111c2adf499f929f3cd7490..a17afc7dee89523c1acefc5bfc78896fd2252487 100644 (file)
@@ -211,6 +211,7 @@ NTSTATUS change_notify_create(struct files_struct *fsp, uint32 filter,
        if (asprintf(&fullpath, "%s/%s", fsp->conn->connectpath,
                     fsp->fsp_name) == -1) {
                DEBUG(0, ("asprintf failed\n"));
+               TALLOC_FREE(fsp->notify);
                return NT_STATUS_NO_MEMORY;
        }