Date: Fri, 15 Jan 2021 20:49:49 GMT From: Mariusz Zaborski <oshogbo@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: c664d8dfc3dd - main - cat: Fix potential memory leak Message-ID: <202101152049.10FKnnLI007683@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=c664d8dfc3dd65611f63ca8277841a29a46260f1 commit c664d8dfc3dd65611f63ca8277841a29a46260f1 Author: Mariusz Zaborski <oshogbo@FreeBSD.org> AuthorDate: 2021-01-15 20:48:39 +0000 Commit: Mariusz Zaborski <oshogbo@FreeBSD.org> CommitDate: 2021-01-15 20:49:52 +0000 cat: Fix potential memory leak This was introduced in aefe30c5437159a5399bdbc1974d6fbf40f2ba0f. --- bin/cat/cat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/cat/cat.c b/bin/cat/cat.c index 58f7c15cc9cb..cdfc983610de 100644 --- a/bin/cat/cat.c +++ b/bin/cat/cat.c @@ -458,6 +458,7 @@ udom_open(const char *path, int flags) } if (caph_rights_limit(fd, &rights) < 0) { close(fd); + freeaddrinfo(res0); return (-1); } error = cap_connect(capnet, fd, res->ai_addr, res->ai_addrlen);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101152049.10FKnnLI007683>