diff options
author | Günther Deschner <gd@samba.org> | 2010-10-01 06:08:12 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2011-06-14 12:57:59 +0200 |
commit | bcded87973ea112c7f6799424d95d05fc013d94f (patch) | |
tree | 71069b87781b6d58aca98c8f63eec7b25636e7f9 | |
parent | df07498c8e770f4474a41833c85fa636830dea90 (diff) | |
download | samba-bcded87973ea112c7f6799424d95d05fc013d94f.tar.gz |
s3-net: make sure we dont crash when publishing a single printer.
Guenther
(cherry picked from commit 21576e3f8c32878910460bf9575c200ad93d682a)
Part of a fix for bug #7993 ("net rpc printer MIGRATE" command fails).
(cherry picked from commit 9c75728c62cccb8da606ece2d9df08b592e7c7c0)
-rw-r--r-- | source3/utils/net_rpc_printer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c index dfc150fa3b0..8b6d73eb525 100644 --- a/source3/utils/net_rpc_printer.c +++ b/source3/utils/net_rpc_printer.c @@ -1091,6 +1091,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; |