summaryrefslogtreecommitdiff
path: root/lib/util/dprintf.c
diff options
context:
space:
mode:
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;
}