git.samba.org
/
kamenim
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5cb5e0a
)
s3-net: make sure we dont crash when publishing a single printer.
author
Günther Deschner
<gd@samba.org>
Fri, 1 Oct 2010 04:08:12 +0000
(06:08 +0200)
committer
Günther Deschner
<gd@samba.org>
Fri, 1 Oct 2010 06:33:46 +0000
(08:33 +0200)
Guenther
source3/utils/net_rpc_printer.c
patch
|
blob
|
history
diff --git
a/source3/utils/net_rpc_printer.c
b/source3/utils/net_rpc_printer.c
index 589a569879776ee13d9707d237f8bdd6d58386a4..79556669672f31817085e0aec57c06a6067878cd 100644
(file)
--- 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;