Previous commit was incorrect. This would correctly handle the memory loss case.
This commit is contained in:
parent
63ebf3c9c2
commit
80013452dc
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue