The branch main has been updated by oshogbo:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=c664d8dfc3dd65611f63ca8277841a29a46260f1

commit c664d8dfc3dd65611f63ca8277841a29a46260f1
Author:     Mariusz Zaborski <[email protected]>
AuthorDate: 2021-01-15 20:48:39 +0000
Commit:     Mariusz Zaborski <[email protected]>
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);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "[email protected]"

Reply via email to