]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
return the rr, up until the parsing went wrong
authorMiek Gieben <miekg@NLnetLabs.nl>
Tue, 5 Apr 2005 14:23:45 +0000 (14:23 +0000)
committerMiek Gieben <miekg@NLnetLabs.nl>
Tue, 5 Apr 2005 14:23:45 +0000 (14:23 +0000)
rr.c

diff --git a/rr.c b/rr.c
index 538530063631bec377ca2ca49e921185af505a1d..29d73a51c4c44c284718d2dcf536f566ec01ff06 100644 (file)
--- a/rr.c
+++ b/rr.c
@@ -199,15 +199,16 @@ ldns_rr_new_frm_str(const char *str)
 
                if (!r) {
                        printf("rdf conversion mismatch\n");
+                       /* return what we've got */
                        FREE(rdata);
-                       return NULL;
+                       return new;
                }
                ldns_rr_push_rdf(new, r);
 
                if (r_cnt > r_max) {
                        printf("rdf data overflow");
                        FREE(rdata);
-                       return NULL;
+                       return new;
                }
                r_cnt++;
        }
@@ -218,7 +219,7 @@ ldns_rr_new_frm_str(const char *str)
        if (!r) {
                printf("rdf conversion mismatch\n");
                FREE(rdata);
-               return NULL;
+               return new;
        }
 
        ldns_rr_push_rdf(new, r);