hppa: Sync with pthread.h.
[platform/upstream/glibc.git] / catgets / catgets.c
index b11cc59..cf93d56 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper, <drepper@gnu.org>.
 
@@ -13,9 +13,8 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 #include <alloca.h>
 #include <errno.h>
@@ -70,8 +69,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;
 }