]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
free the alloced data
authorJelte Jansen <jeltejan@NLnetLabs.nl>
Thu, 6 Apr 2006 09:09:17 +0000 (09:09 +0000)
committerJelte Jansen <jeltejan@NLnetLabs.nl>
Thu, 6 Apr 2006 09:09:17 +0000 (09:09 +0000)
rr.c

diff --git a/rr.c b/rr.c
index 2c18dba7b3a6ac9df0686e9b42b3c05b3dd4fe47..f51793b3a34999df348e6587a1f7ccfffb9729f8 100644 (file)
--- a/rr.c
+++ b/rr.c
@@ -500,10 +500,6 @@ ldns_rr_new_frm_fp_l(ldns_rr **newrr, FILE *fp, uint16_t *default_ttl, ldns_rdf
                 * always a parse error (happens when for instance last line
                 * was a comment)
                 */
-               /*if (feof(fp)) {
-                       return LDNS_STATUS_OK;
-               }
-               */
                 return LDNS_STATUS_SYNTAX_ERR;
         }
 
@@ -511,6 +507,7 @@ ldns_rr_new_frm_fp_l(ldns_rr **newrr, FILE *fp, uint16_t *default_ttl, ldns_rdf
         * no bytes to play with, in this case size is 0 
         */
        if (size == 0) {
+               LDNS_FREE(line);
                return LDNS_STATUS_SYNTAX_EMPTY;
        }