Update.
[platform/upstream/glibc.git] / catgets / catgets.c
index b11cc59..9fd0115 100644 (file)
@@ -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;
 }