return 0;
}
- ldns_edns_free(edns);
+ ldns_edns_deep_free(edns);
edns = ldns_edns_new_from_data(LDNS_EDNS_EDE, 4, hex_data);
ldns_edns_deep_free(edns);
ldns_edns_deep_free(clone);
-
return 1;
}
if (ldns_buffer_read_u8(buf) != hex_data[i]) {
printf("Error: EDNS data is incorrect: %d, %d\n",
ldns_buffer_read_u8_at(buf, i), hex_data[i]);
+ ldns_buffer_free(buf);
return 0;
}
}
if (ldns_buffer_read_u8(buf) != hex_data2[i]) {
printf("Error: EDNS data is incorrect: %d, %d\n",
ldns_buffer_read_u8_at(buf, i), hex_data2[i]);
+ ldns_buffer_free(buf);
return 0;
}
}
+ ldns_buffer_free(buf);
+ buf = NULL;
/* Replace the first option with a copy of the second */
option = ldns_edns_new_from_data(LDNS_EDNS_PADDING, 5, hex_data2);
if (!(check_option_list_entries(clone, option, 1, LDNS_EDNS_PADDING, 5, hex_data2))) {
printf("Error: EDNS list entries are incorrect\n");
+ ldns_edns_option_list_deep_free(clone);
return 0;
}
return 0;
}
- ldns_edns_option_list_free(clone);
+ ldns_edns_option_list_deep_free(clone);
ldns_edns_option_list_deep_free(list);