projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
memory leak fix.
[silc.git]
/
lib
/
silcutil
/
silcstrutil.c
diff --git
a/lib/silcutil/silcstrutil.c
b/lib/silcutil/silcstrutil.c
index 904873062130a79133c2350b31410e2fce571c96..53c1a0241b9805731967f996c0e2f4571a5be9df 100644
(file)
--- a/
lib/silcutil/silcstrutil.c
+++ b/
lib/silcutil/silcstrutil.c
@@
-212,8
+212,9
@@
SilcUInt32 silc_utf8_encode(const unsigned char *bin, SilcUInt32 bin_len,
iconv_close(icd);
return utf8_size;
}
- iconv_close(icd);
}
+ if (icd != (iconv_t)-1)
+ iconv_close(icd);
}
#endif
@@
-355,8
+356,9
@@
SilcUInt32 silc_utf8_decode(const unsigned char *utf8, SilcUInt32 utf8_len,
iconv_close(icd);
return bin_size;
}
- iconv_close(icd);
}
+ if (icd != (iconv_t)-1)
+ iconv_close(icd);
}
#endif