]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1895. [bug] fctx_create() could return success even though it
authorMark Andrews <marka@isc.org>
Mon, 4 Jul 2005 22:52:34 +0000 (22:52 +0000)
committerMark Andrews <marka@isc.org>
Mon, 4 Jul 2005 22:52:34 +0000 (22:52 +0000)
                        failed. [RT #14993]

CHANGES
lib/dns/resolver.c

diff --git a/CHANGES b/CHANGES
index fa4378bd36c3acca903240cf671adcf7be0ec232..af12c92b41319a2298ab99869f2789682efbd392 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1895.  [bug]           fctx_create() could return success even though it
+                       failed. [RT #14993]
+
 1894.  [func]          dig: report the number of extra bytes still left in
                        the packet after processing all the records.
 
index da24a3f787adabd85c53a13a6ea5ccadf99e4310..8f2a3267d30aa8a93e79aeec9473124f30dc5e2b 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: resolver.c,v 1.314 2005/06/27 00:15:43 marka Exp $ */
+/* $Id: resolver.c,v 1.315 2005/07/04 22:52:34 marka Exp $ */
 
 /*! \file */
 
@@ -2698,7 +2698,7 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
            unsigned int options, unsigned int bucketnum, fetchctx_t **fctxp)
 {
        fetchctx_t *fctx;
-       isc_result_t result = ISC_R_SUCCESS;
+       isc_result_t result;
        isc_result_t iresult;
        isc_interval_t interval;
        dns_fixedname_t fixed;
@@ -2720,8 +2720,10 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
        strcat(buf, "/");       /* checked */
        strcat(buf, typebuf);   /* checked */
        fctx->info = isc_mem_strdup(res->buckets[bucketnum].mctx, buf);
-       if (fctx->info == NULL)
+       if (fctx->info == NULL) {
+               result = ISC_R_NOMEMORY;
                goto cleanup_fetch;
+       }
        FCTXTRACE("create");
        dns_name_init(&fctx->name, NULL);
        result = dns_name_dup(name, res->buckets[bucketnum].mctx, &fctx->name);