s3-spoolss: Check return type of update_dsspooler().
authorAndreas Schneider <asn@samba.org>
Tue, 14 Feb 2012 10:56:37 +0000 (11:56 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 14 Mar 2012 18:38:45 +0000 (19:38 +0100)
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Mar 14 19:38:45 CET 2012 on sn-devel-104

source3/rpc_server/spoolss/srv_spoolss_nt.c

index 400884860ea1d672236158a124b375b5d9e8b1ed..ef987e5fc913bbeb25f819e398c81b6faddfe717 100644 (file)
@@ -6744,12 +6744,15 @@ static WERROR update_printer(struct pipes_struct *p,
                }
        }
 
-       update_dsspooler(tmp_ctx,
-                        get_session_info_system(),
-                        p->msg_ctx,
-                        snum,
-                        printer,
-                        old_printer);
+       result = update_dsspooler(tmp_ctx,
+                                 get_session_info_system(),
+                                 p->msg_ctx,
+                                 snum,
+                                 printer,
+                                 old_printer);
+       if (!W_ERROR_IS_OK(result)) {
+               goto done;
+       }
 
        printer_mask &= ~SPOOLSS_PRINTER_INFO_SECDESC;
 
@@ -8105,12 +8108,15 @@ static WERROR spoolss_addprinterex_level_2(struct pipes_struct *p,
                info2_mask = ~SPOOLSS_PRINTER_INFO_DEVMODE;
        }
 
-       update_dsspooler(p->mem_ctx,
-                        get_session_info_system(),
-                        p->msg_ctx,
-                        0,
-                        info2,
-                        NULL);
+       err = update_dsspooler(p->mem_ctx,
+                              get_session_info_system(),
+                              p->msg_ctx,
+                              0,
+                              info2,
+                              NULL);
+       if (!W_ERROR_IS_OK(err)) {
+               return err;
+       }
 
        err = winreg_update_printer_internal(p->mem_ctx,
                                    get_session_info_system(),