]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
spoolss: clear info on GetPrinterDriverDirectory error
authorDavid Disseldorp <ddiss@samba.org>
Wed, 17 Dec 2014 15:47:50 +0000 (16:47 +0100)
committerKarolin Seeger <kseeger@samba.org>
Wed, 14 Jan 2015 20:58:09 +0000 (21:58 +0100)
If an error is returned without zeroing a pre-allocated @info pointer,
then marshalling of the response will fail.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10984

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit c9fccb5018f9a19bb654b9ad79aa716e37a274d6)

source3/rpc_server/spoolss/srv_spoolss_nt.c

index 5dfbc1a4fdd71e438a38743a596b96ba27a92501..cf2526d148ba9f4eea256a62cc46c9e39e6f50ce 100644 (file)
@@ -8539,6 +8539,7 @@ WERROR _spoolss_GetPrinterDriverDirectory(struct pipes_struct *p,
        /* that's an [in out] buffer */
 
        if (!r->in.buffer && (r->in.offered != 0)) {
+               TALLOC_FREE(r->out.info);
                return WERR_INVALID_PARAM;
        }