summaryrefslogtreecommitdiff
path: root/lib/localcharset.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-03-06 11:19:23 +0000
committerJim Meyering <jim@meyering.net>2000-03-06 11:19:23 +0000
commit9ebf9199a4f9c056aec0edb3914450ad3db77b90 (patch)
treebd874afda650e067abcf7c9e3e3be63a369dc013 /lib/localcharset.c
parenta688ad3b575a424a04325f32e1fa20dd880d6ecf (diff)
downloadcoreutils-9ebf9199a4f9c056aec0edb3914450ad3db77b90.tar.xz
(get_charset_aliases): Don't try to free file_name
if it's NULL (because we ran out of memory). From Bruno Haible.
Diffstat (limited to 'lib/localcharset.c')
-rw-r--r--lib/localcharset.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/localcharset.c b/lib/localcharset.c
index 86f7ed1b2..e80a2c523 100644
--- a/lib/localcharset.c
+++ b/lib/localcharset.c
@@ -132,7 +132,8 @@ get_charset_aliases ()
}
charset_aliases = cp;
- free (file_name);
+ if (file_name != NULL)
+ free (file_name);
}
return cp;