summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-10-01 06:08:12 +0200
committerGünther Deschner <gd@samba.org>2010-10-01 08:33:46 +0200
commit21576e3f8c32878910460bf9575c200ad93d682a (patch)
tree396b342860cc9e6817484afafcdac3ee22934bf6 /source3/utils
parent5cb5e0aa9881758ec9f5af7da4fbc002ba91f49b (diff)
downloadsamba-21576e3f8c32878910460bf9575c200ad93d682a.tar.gz
samba-21576e3f8c32878910460bf9575c200ad93d682a.tar.bz2
samba-21576e3f8c32878910460bf9575c200ad93d682a.zip
s3-net: make sure we dont crash when publishing a single printer.
Guenther
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_rpc_printer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c
index 589a569879..7955666967 100644
--- a/source3/utils/net_rpc_printer.c
+++ b/source3/utils/net_rpc_printer.c
@@ -1093,6 +1093,11 @@ static bool get_printer_info(struct rpc_pipe_client *pipe_hnd,
&hnd))
return false;
+ *info_p = talloc_zero(mem_ctx, union spoolss_PrinterInfo);
+ if (*info_p == NULL) {
+ return false;
+ }
+
if (!net_spoolss_getprinter(pipe_hnd, mem_ctx, &hnd, level, *info_p)) {
rpccli_spoolss_ClosePrinter(pipe_hnd, mem_ctx, &hnd, NULL);
return false;