s3-spoolss: Fix _spoolss_GetPrinter().
authorGünther Deschner <gd@samba.org>
Fri, 10 Sep 2010 14:55:23 +0000 (16:55 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 10 Sep 2010 15:11:12 +0000 (17:11 +0200)
In the error case, we need to TALLOC_FREE(r->out.info), don't ask :-)

Guenther

source3/rpc_server/srv_spoolss_nt.c

index b5e2ddbdc639b85152457ba57546cb45f490407c..881f0e55553d7041be4bd0a3eae6697f290392f8 100644 (file)
@@ -4533,7 +4533,7 @@ WERROR _spoolss_GetPrinter(struct pipes_struct *p,
                                    lp_const_servicename(snum),
                                    &info2);
        if (!W_ERROR_IS_OK(result)) {
-               return result;
+               goto out;
        }
 
        switch (r->in.level) {
@@ -4584,6 +4584,7 @@ WERROR _spoolss_GetPrinter(struct pipes_struct *p,
                break;
        }
 
+ out:
        if (!W_ERROR_IS_OK(result)) {
                DEBUG(0, ("_spoolss_GetPrinter: failed to construct printer info level %d - %s\n",
                          r->in.level, win_errstr(result)));