diff options
Diffstat (limited to 'intl/explodename.c')
-rw-r--r-- | intl/explodename.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/intl/explodename.c b/intl/explodename.c index 8d3e1463d..eb5dd755c 100644 --- a/intl/explodename.c +++ b/intl/explodename.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1998, 2000-2001, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1995-1998, 2000-2001, 2003, 2005, 2007 Free Software Foundation, Inc. Contributed by Ulrich Drepper <[email protected]>, 1995. This program is free software; you can redistribute it and/or modify it @@ -105,7 +105,9 @@ _nl_explode_name (char *name, { *normalized_codeset = _nl_normalize_codeset (*codeset, cp - *codeset); - if (strcmp (*codeset, *normalized_codeset) == 0) + if (*normalized_codeset == NULL) + return -1; + else if (strcmp (*codeset, *normalized_codeset) == 0) free ((char *) *normalized_codeset); else mask |= XPG_NORM_CODESET; |