From: W.C.A. Wijngaards Date: Fri, 9 Aug 2013 14:21:57 +0000 (+0200) Subject: Fixes indicated by Stack X-Git-Tag: release-1.6.17rc1~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3e1c0e80badf753bc9327928c98c6e5757aa9f8;p=thirdparty%2Fldns.git Fixes indicated by Stack --- diff --git a/radix.c b/radix.c index 99764aec..69797567 100644 --- a/radix.c +++ b/radix.c @@ -202,8 +202,8 @@ ldns_radix_insert(ldns_radix_t* tree, uint8_t* key, radix_strlen_t len, /** Find some space in the array for the first byte */ if (!ldns_radix_array_space(prefix, key[0])) { LDNS_FREE(add); - LDNS_FREE(prefix); LDNS_FREE(prefix->array); + LDNS_FREE(prefix); return LDNS_STATUS_MEM_ERR; } /** Set relational pointers */ @@ -216,8 +216,8 @@ ldns_radix_insert(ldns_radix_t* tree, uint8_t* key, radix_strlen_t len, len, &prefix->array[0].str, &prefix->array[0].len)) { LDNS_FREE(add); - LDNS_FREE(prefix); LDNS_FREE(prefix->array); + LDNS_FREE(prefix); return LDNS_STATUS_MEM_ERR; } } diff --git a/resolver.c b/resolver.c index 92619184..fed4a4c0 100644 --- a/resolver.c +++ b/resolver.c @@ -729,7 +729,7 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr) do { c = fgetc(myfp); } while(c != EOF && c != '\n'); - if(c=='\n' && line_nr) (*line_nr)++; + if(c=='\n') (*line_nr)++; } /* and read next to prepare for further parsing */ oldline = *line_nr;