summaryrefslogtreecommitdiffstats
path: root/charset.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>2001-01-08 23:09:30 +0000
committerThomas Roessler <roessler@does-not-exist.org>2001-01-08 23:09:30 +0000
commitcfdb67df5d5daa13ce785a2f4e87d8f12b673d71 (patch)
tree2d3d9b569a3392e85663155bd6dfcdc81a9e07e9 /charset.c
parentd5a336245304225932d3b5d18f82336bebb01efe (diff)
Let check_sec.sh check for use of the unsafe malloc, realloc, free,
and strdup routines. While we are on it, plug some memory leaks and make some code understandable.
Diffstat (limited to 'charset.c')
-rw-r--r--charset.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/charset.c b/charset.c
index e7146f3e..6d36e79e 100644
--- a/charset.c
+++ b/charset.c
@@ -514,11 +514,11 @@ int fgetconv (FGETCONV *_fc)
return EOF;
}
-void fgetconv_close (FGETCONV *_fc)
+void fgetconv_close (FGETCONV **_fc)
{
- struct fgetconv_s *fc = (struct fgetconv_s *)_fc;
+ struct fgetconv_s *fc = (struct fgetconv_s *) *_fc;
if (fc->cd != (iconv_t)-1)
iconv_close (fc->cd);
- free (fc);
+ safe_free (_fc);
}