summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2002-01-19 17:29:32 +0000
committerSimo Sorce <idra@samba.org>2002-01-19 17:29:32 +0000
commit7019bfe546912397e7f4d37a44a510ce17a7febb (patch)
tree38c00e34ce75329ad7f345174328f19b5bc5887f /source3/rpcclient
parent72544acc0d8fe7d3b43c3472638fe0ff847e993f (diff)
downloadsamba-7019bfe546912397e7f4d37a44a510ce17a7febb.tar.gz
samba-7019bfe546912397e7f4d37a44a510ce17a7febb.tar.bz2
samba-7019bfe546912397e7f4d37a44a510ce17a7febb.zip
fixes (asprintf) from 2.2
(This used to be commit 6b123adda901ff05b0271eeda060297448f64eec)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_spoolss.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index ed65632344..f0e6af9822 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -1183,11 +1183,15 @@ static NTSTATUS cmd_spoolss_getprintprocdir(struct cli_state *cli,
return NT_STATUS_OK;
}
- asprintf(&servername, "\\\\%s", cli->desthost);
+ if (asprintf(&servername, "\\\\%s", cli->desthost) < 0)
+ return NT_STATUS_NO_MEMORY;
strupper(servername);
- asprintf(&environment, "%s", (argc == 3) ? argv[2] :
- PRINTER_DRIVER_ARCHITECTURE);
+ if (asprintf(&environment, "%s", (argc == 3) ? argv[2] :
+ PRINTER_DRIVER_ARCHITECTURE) < 0) {
+ SAFE_FREE(servername);
+ return NT_STATUS_NO_MEMORY;
+ }
result = cli_spoolss_getprintprocessordirectory(
cli, mem_ctx, servername, environment, procdir);