about summary refs log tree commit diff
path: root/nscd
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-11-24 08:05:15 +0000
committerJakub Jelinek <jakub@redhat.com>2004-11-24 08:05:15 +0000
commit945a6124b6aa3047e3d144da4fb47cbbf5da70ee (patch)
tree7b7d217428c431919749c4e8280228da5739c25e /nscd
parent06bc2b63c861ca3f53e5e98bc0ecd23e4b159531 (diff)
downloadglibc-945a6124b6aa3047e3d144da4fb47cbbf5da70ee.tar.gz
glibc-945a6124b6aa3047e3d144da4fb47cbbf5da70ee.tar.xz
glibc-945a6124b6aa3047e3d144da4fb47cbbf5da70ee.zip
Updated to fedora-glibc-20041124T0741 cvs/fedora-glibc-2_3_3-84
Diffstat (limited to 'nscd')
-rw-r--r--nscd/nscd_getai.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/nscd/nscd_getai.c b/nscd/nscd_getai.c
index f0b2082baa..24b374b0dc 100644
--- a/nscd/nscd_getai.c
+++ b/nscd/nscd_getai.c
@@ -104,7 +104,7 @@ __nscd_getai (const char *key, struct nscd_ai_result **result, int *h_errnop)
       if (resultbuf == NULL)
 	{
 	  *h_errnop = NETDB_INTERNAL;
-	  return -1;
+	  goto out_close;
 	}
 
       /* Set up the data structure, including pointers.  */
@@ -140,7 +140,10 @@ __nscd_getai (const char *key, struct nscd_ai_result **result, int *h_errnop)
 	  if (resultbuf->canon != NULL
 	      && resultbuf->canon[ai_resp->canonlen - 1] != '\0')
 	    /* We cannot use the database.  */
-	    goto out_close;
+	    {
+	      free (resultbuf);
+	      goto out_close;
+	    }
 
 	  retval = 0;
 	  *result = resultbuf;
@@ -173,6 +176,7 @@ __nscd_getai (const char *key, struct nscd_ai_result **result, int *h_errnop)
 	  mapped = NO_MAPPING;
 	}
 
+      *result = NULL;
       free (resultbuf);
 
       goto retry;