From: Wouter Wijngaards Date: Tue, 15 Jul 2008 10:22:39 +0000 (+0000) Subject: fixup error handling in libunbound ub_resolve(). X-Git-Tag: release-1.0.1~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8459b5f55ff82b76ce47d85286419a06a6deb4bd;p=thirdparty%2Funbound.git fixup error handling in libunbound ub_resolve(). git-svn-id: file:///svn/unbound/trunk@1149 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 07147ddbf..82b14794e 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -2,6 +2,7 @@ - Follow draft-ietf-dnsop-default-local-zones-06 added reverse IPv6 example prefix to AS112 default blocklist. - fixup lookup of DS records by client with trustanchor for same. + - libunbound ub_resolve, fix handling of error condition during setup. 3 July 2008: Wouter - Matthijs fixed memory leaks in root hints file reading. diff --git a/libunbound/libunbound.c b/libunbound/libunbound.c index 4b7a6d5e3..901e87033 100644 --- a/libunbound/libunbound.c +++ b/libunbound/libunbound.c @@ -576,6 +576,7 @@ ub_resolve(struct ub_ctx* ctx, char* name, int rrtype, { struct ctx_query* q; int r; + *result = NULL; lock_basic_lock(&ctx->cfglock); if(!ctx->finalized) { @@ -591,7 +592,6 @@ ub_resolve(struct ub_ctx* ctx, char* name, int rrtype, if(!q) return UB_NOMEM; /* become a resolver thread for a bit */ - *result = NULL; r = libworker_fg(ctx, q); if(r) {