summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-11-11 13:26:10 +0100
committerGünther Deschner <gd@samba.org>2010-11-17 15:20:14 +0100
commitb432a3ba194fdd8a12f5198cd6012d4916301da4 (patch)
treeab6beeac26b7fc94d12b5ce35d6cf3a607a185a3 /source3
parent0a4b7bb9a547011c4c39b75acee1c00c90562cd1 (diff)
downloadsamba-b432a3ba194fdd8a12f5198cd6012d4916301da4.tar.gz
samba-b432a3ba194fdd8a12f5198cd6012d4916301da4.tar.bz2
samba-b432a3ba194fdd8a12f5198cd6012d4916301da4.zip
s3-rpcclient: exit early in cmd_spoolss_enum_data() when there is a failure.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/rpcclient/cmd_spoolss.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 26112b960f..1bb3a71d5e 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -2902,6 +2902,15 @@ static WERROR cmd_spoolss_enum_data(struct rpc_pipe_client *cli,
&data_needed,
&result);
+ if (!NT_STATUS_IS_OK(status)) {
+ result = ntstatus_to_werror(status);
+ goto done;
+ }
+
+ if (!W_ERROR_IS_OK(result)) {
+ goto done;
+ }
+
data_offered = data_needed;
value_offered = value_needed;
data = talloc_zero_array(mem_ctx, uint8_t, data_needed);