fixed another spoolss memory leak
authorAndrew Tridgell <tridge@samba.org>
Sun, 23 Apr 2000 08:40:54 +0000 (08:40 +0000)
committerAndrew Tridgell <tridge@samba.org>
Sun, 23 Apr 2000 08:40:54 +0000 (08:40 +0000)
I am falling in love with insure - it is finding _lots_ of memory
problems
(This used to be commit d9b4076293a4d37e1558ad63a3f522385ee3e521)

source3/rpc_server/srv_spoolss.c
source3/rpc_server/srv_spoolss_nt.c

index 8ae75eec6ccec6b25445d716bd063c10b0d94172..aaa87fe6ffdcfb70b549c70e96f73325dc72c79b 100755 (executable)
@@ -172,6 +172,8 @@ static BOOL api_spoolss_rfnpcnex(prs_struct *data, prs_struct *rdata)
        r_u.status = _spoolss_rfnpcnex(&q_u.handle, q_u.change,
                                       q_u.option, &r_u.info);
 
+       safe_free(q_u.option);
+
        /* we always have a NOTIFY_INFO struct */
        r_u.info_ptr=0x1;
 
index 52eaaafe6f5f4ef51406d34b8ba9934965695679..05af14e8301601df743f7f241d2123464ae3be37 100644 (file)
@@ -1575,8 +1575,6 @@ uint32 _spoolss_rfnpcnex( const POLICY_HND *handle, uint32 change,
        if (option!=NULL)
                safe_free(option->ctr.type);
        
-       safe_free(option);
-
        switch (Printer->printer_type) {
                case PRINTER_HANDLE_IS_PRINTSERVER:
                        return printserver_notify_info(handle, info);