Second attempt to fix bug #8384 - Windows XP clients seem to crash smbd process every...
authorJeremy Allison <jra@samba.org>
Tue, 25 Oct 2011 22:31:48 +0000 (15:31 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 26 Oct 2011 00:42:35 +0000 (02:42 +0200)
Don't just use the first entry in back_channels as a talloc context
to allocate a long-lived chan entry on - must be NULL. It's already
correctly deleted when the last reference goes away.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Oct 26 02:42:35 CEST 2011 on sn-devel-104

source3/rpc_server/spoolss/srv_spoolss_nt.c

index 2efd8823cff4c2ba5054c9eceaa1b6a47ea985a2..3405566ed76921fc7de0b99db045aea42e89aefa 100644 (file)
@@ -2613,7 +2613,7 @@ static bool srv_spoolss_replyopenprinter(int snum, const char *printer,
                /* the +2 is to strip the leading 2 backslashs */
                fstrcpy(unix_printer, printer + 2);
 
-               chan = talloc_zero(back_channels, struct notify_back_channel);
+               chan = talloc_zero(NULL, struct notify_back_channel);
                if (!chan) {
                        return false;
                }