summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);