diff options
author | peter <peter@FreeBSD.org> | 2013-07-01 08:38:31 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2013-07-01 08:38:31 +0000 |
commit | 4a24ccbeb99b45c86587b00b80e7b7fa9131e4fe (patch) | |
tree | 60a83d6f3ecbcf3af1f61a3283e8a2fc19cef91d /lib/libc/iconv | |
parent | c77016ccdaf40ab136d3fd9db47a6aad98135ae6 (diff) | |
download | FreeBSD-src-4a24ccbeb99b45c86587b00b80e7b7fa9131e4fe.zip FreeBSD-src-4a24ccbeb99b45c86587b00b80e7b7fa9131e4fe.tar.gz |
If strdup failed, don't try and free the wrong thing.
Diffstat (limited to 'lib/libc/iconv')
-rw-r--r-- | lib/libc/iconv/citrus_mapper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/iconv/citrus_mapper.c b/lib/libc/iconv/citrus_mapper.c index b5ae96d..af89b50 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); |