summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_nt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index ef203d8f54..891f4296b9 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -4867,8 +4867,10 @@ static WERROR string_array_from_driver_info(TALLOC_CTX *mem_ctx,
&array, &num_strings);
}
- if (presult) {
+ if (presult != NULL) {
*presult = array;
+ } else {
+ talloc_free(array);
}
return WERR_OK;