From 7c5cb6be8cf38d758b3c4a3ad65975e17d730d04 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Mon, 1 Jul 2013 08:38:31 +0000 Subject: [PATCH] If strdup failed, don't try and free the wrong thing. --- lib/libc/iconv/citrus_mapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/iconv/citrus_mapper.c b/lib/libc/iconv/citrus_mapper.c index b5ae96d920f7..af89b500615d 100644 --- a/lib/libc/iconv/citrus_mapper.c +++ b/lib/libc/iconv/citrus_mapper.c @@ -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);