summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-03-31 00:50:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:50 -0500
commit4f53350b43cb9947ca6ca0b133992405012dc300 (patch)
treee14882733211e118b626d3c1c4d330f10265686c /source3
parent576e17cbf3fe10cb8338ab00eeea6211266af390 (diff)
downloadsamba-4f53350b43cb9947ca6ca0b133992405012dc300.tar.gz
samba-4f53350b43cb9947ca6ca0b133992405012dc300.tar.bz2
samba-4f53350b43cb9947ca6ca0b133992405012dc300.zip
r14833: Fix resource leak on error code path. Coverity #280.
Jeremy. (This used to be commit b985bdcb87eeb70725f2d625a4ea5ec39bda1b94)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpcclient/cmd_spoolss.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 137335962e..f04b6a8ec9 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -2396,9 +2396,10 @@ static WERROR cmd_spoolss_enum_printerkey( struct rpc_pipe_client *cli,
curkey += strlen(subkey) + 1;
}
- safe_free(keylist);
-
done:
+
+ SAFE_FREE(keylist);
+
if (got_hnd)
rpccli_spoolss_close_printer(cli, mem_ctx, &hnd);