projects
/
silc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e87ea3
)
memory leak fix.
author
Pekka Riikonen
<priikone@silcnet.org>
Sun, 23 Jun 2002 14:41:19 +0000
(14:41 +0000)
committer
Pekka Riikonen
<priikone@silcnet.org>
Sun, 23 Jun 2002 14:41:19 +0000
(14:41 +0000)
lib/silcutil/silcstrutil.c
patch
|
blob
|
history
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