Author: peter
Date: Mon Jul  1 08:38:31 2013
New Revision: 252464
URL: http://svnweb.freebsd.org/changeset/base/252464

Log:
  If strdup failed, don't try and free the wrong thing.

Modified:
  head/lib/libc/iconv/citrus_mapper.c

Modified: head/lib/libc/iconv/citrus_mapper.c
==============================================================================
--- head/lib/libc/iconv/citrus_mapper.c Mon Jul  1 08:37:42 2013        
(r252463)
+++ head/lib/libc/iconv/citrus_mapper.c Mon Jul  1 08:38:31 2013        
(r252464)
@@ -96,7 +96,7 @@ _citrus_mapper_create_area(
        ma->ma_dir = strdup(area);
        if (ma->ma_dir == NULL) {
                ret = errno;
-               free(ma->ma_dir);
+               free(ma);
                goto quit;
        }
        _CITRUS_HASH_INIT(&ma->ma_cache, CM_HASH_SIZE);
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to