diff options
author | Andreas Schneider <asn@samba.org> | 2013-02-20 09:06:51 +0100 |
---|---|---|
committer | Alexander Bokovoy <ab@samba.org> | 2013-02-22 16:36:13 +0100 |
commit | c013df3ae52d57b1206f156a2fc529f52cf39531 (patch) | |
tree | 2a52aa6a811f19bcec1238df5053712193bd144f /source3/rpc_server | |
parent | b70d1168cf511c83eaa6a2761d3924935513d233 (diff) | |
download | samba-c013df3ae52d57b1206f156a2fc529f52cf39531.tar.gz |
s3-spoolss: Don't leak memory.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/spoolss/srv_spoolss_nt.c | 4 |
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; |