From cfdb67df5d5daa13ce785a2f4e87d8f12b673d71 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Mon, 8 Jan 2001 23:09:30 +0000 Subject: 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. --- charset.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'charset.c') 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); } -- cgit v1.2.3