diff options
Diffstat (limited to 'catgets/catgets.c')
-rw-r--r-- | catgets/catgets.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/catgets/catgets.c b/catgets/catgets.c index b11cc597b3..9fd0115806 100644 --- a/catgets/catgets.c +++ b/catgets/catgets.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1996-2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, <drepper@gnu.org>. @@ -70,8 +70,11 @@ catopen (const char *cat_name, int flag) return (nl_catd) -1; if (__open_catalog (cat_name, nlspath, env_var, result) != 0) - /* Couldn't open the file. */ - return (nl_catd) -1; + { + /* Couldn't open the file. */ + free ((void *) result); + return (nl_catd) -1; + } return (nl_catd) result; } |