From owner-dev-commits-ports-all@freebsd.org Tue Jul 13 10:20:19 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4EE51657812; Tue, 13 Jul 2021 10:20:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GPGq71bDkz3tmG; Tue, 13 Jul 2021 10:20:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F81320A92; Tue, 13 Jul 2021 10:20:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 16DAKJ6G005293; Tue, 13 Jul 2021 10:20:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16DAKJZC005290; Tue, 13 Jul 2021 10:20:19 GMT (envelope-from git) Date: Tue, 13 Jul 2021 10:20:19 GMT Message-Id: <202107131020.16DAKJZC005290@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Alexey Dokuchaev Subject: git: b275a10c2b0e - main - net/openmdns: fix daemon memory leaks in various expected paths. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: danfe X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b275a10c2b0eb472235faf136a58f1a580578509 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2021 10:20:19 -0000 The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=b275a10c2b0eb472235faf136a58f1a580578509 commit b275a10c2b0eb472235faf136a58f1a580578509 Author: Alexey Dokuchaev AuthorDate: 2021-07-13 10:19:12 +0000 Commit: Alexey Dokuchaev CommitDate: 2021-07-13 10:19:34 +0000 net/openmdns: fix daemon memory leaks in various expected paths. PR: 249296 --- net/openmdns/Makefile | 2 +- net/openmdns/files/patch-mdnsd_mdns.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/net/openmdns/Makefile b/net/openmdns/Makefile index 2134d392129f..95dd599faef2 100644 --- a/net/openmdns/Makefile +++ b/net/openmdns/Makefile @@ -1,6 +1,6 @@ PORTNAME= openmdns DISTVERSION= 0.7 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net MAINTAINER= ports@FreeBSD.org 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)); + }