summaryrefslogtreecommitdiff
path: root/lib/util/dprintf.c
diff options
context:
space:
mode:
authorInra <rainy3@poczta.onet.pl>2009-09-07 09:40:34 +0200
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-09-07 09:40:34 +0200
commit7ce01743c1a2a51c9e212bc612024862c4d53559 (patch)
treef205fea74b64a5b966e05ea91a3d7c8345f384f8 /lib/util/dprintf.c
parent231d276430bb4fd0d0e6fd64a73c8a6524de69eb (diff)
downloadsamba-7ce01743c1a2a51c9e212bc612024862c4d53559.tar.gz
samba-7ce01743c1a2a51c9e212bc612024862c4d53559.tar.bz2
samba-7ce01743c1a2a51c9e212bc612024862c4d53559.zip
s4: Fix "Small memory leak after calling several times lp_update"
Should fix bug #6660.
Diffstat (limited to 'lib/util/dprintf.c')
-rw-r--r--lib/util/dprintf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/util/dprintf.c b/lib/util/dprintf.c
index 3e6d0e8bca..e9a15dcbe6 100644
--- a/lib/util/dprintf.c
+++ b/lib/util/dprintf.c
@@ -39,6 +39,9 @@ static smb_iconv_t display_cd = (smb_iconv_t)-1;
void d_set_iconv(smb_iconv_t cd)
{
+ if (display_cd != (smb_iconv_t)-1)
+ talloc_free(display_cd);
+
display_cd = cd;
}