Previous commit was incorrect. This would correctly handle the memory loss case.

This commit is contained in:
William King 2013-06-06 23:54:07 -07:00
parent 63ebf3c9c2
commit 80013452dc
1 changed files with 5 additions and 1 deletions

View File

@ -312,7 +312,11 @@ static void parse_naptr(const ldns_rr *naptr, const char *number, enum_record_t
char *regex, *replace;
if (!zstr(str)) {
if (zstr(str)) {
if (str != NULL) {
/* In this case ldns_rr2str returned a malloc'd null terminated string */
switch_safe_free(str);
}
return;
}