aboutsummaryrefslogtreecommitdiff
path: root/net/openmdns/files/patch-mdnsd_mdns.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/openmdns/files/patch-mdnsd_mdns.c')
-rw-r--r--net/openmdns/files/patch-mdnsd_mdns.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/net/openmdns/files/patch-mdnsd_mdns.c b/net/openmdns/files/patch-mdnsd_mdns.c
index 51033c03b314..319ad7069259 100644
--- a/net/openmdns/files/patch-mdnsd_mdns.c
+++ b/net/openmdns/files/patch-mdnsd_mdns.c
@@ -10,3 +10,33 @@
/*
* RR cache
*/
+@@ -155,8 +158,10 @@ cache_process(struct rr *rr)
+ /* TODO Cancel possible deletion */
+ log_warnx("cache_process: recover %s",
+ rrs_str(&rr->rrs));
++ free(rr);
+ return (0);
+ }
++ free(rr);
+ return (0);
+ }
+ /*
+@@ -186,14 +191,17 @@ cache_process(struct rr *rr)
+ rr_aux->ttl = rr->ttl;
+ rr_aux->revision = 0;
+ cache_schedrev(rr_aux);
++ free(rr);
+
+ return (0);
+ }
+ }
+ }
+ /* Got a goodbye for a record we don't have */
+- if (rr->ttl == 0)
++ if (rr->ttl == 0) {
++ free(rr);
+ return (0);
++ }
+
+ return (cache_insert(rr));
+ }