summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-02-20 09:06:51 +0100
committerAlexander Bokovoy <ab@samba.org>2013-02-22 16:36:13 +0100
commitc013df3ae52d57b1206f156a2fc529f52cf39531 (patch)
tree2a52aa6a811f19bcec1238df5053712193bd144f
parentb70d1168cf511c83eaa6a2761d3924935513d233 (diff)
downloadsamba-c013df3ae52d57b1206f156a2fc529f52cf39531.tar.gz
samba-c013df3ae52d57b1206f156a2fc529f52cf39531.tar.bz2
samba-c013df3ae52d57b1206f156a2fc529f52cf39531.zip
s3-spoolss: Don't leak memory.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
-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;