Possible memory leak, completely harmless for now, but: sbin/camcontrol/camcontrol.c getdevtree() allocates an array: > ccb.cdm.matches = (struct dev_match_result *)malloc(bufsize); and I see no corresponding free().
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=abfd031b482f92320e29a2c2ac80fcd23e134446 commit abfd031b482f92320e29a2c2ac80fcd23e134446 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-10-28 13:52:32 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-10-28 15:14:36 +0000 camcontrol: Plug a memory leak in getdevtree() PR: 275338 MFC after: 1 week sbin/camcontrol/camcontrol.c | 1 + 1 file changed, 1 insertion(+)
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=5a07e99407eac4211de2d985b39b4c77e94beb09 commit 5a07e99407eac4211de2d985b39b4c77e94beb09 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-10-28 13:52:32 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-11-04 15:38:35 +0000 camcontrol: Plug a memory leak in getdevtree() PR: 275338 MFC after: 1 week (cherry picked from commit abfd031b482f92320e29a2c2ac80fcd23e134446) sbin/camcontrol/camcontrol.c | 1 + 1 file changed, 1 insertion(+)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=4f47e1d88f9107af16ffea5d36c505b1fcc44944 commit 4f47e1d88f9107af16ffea5d36c505b1fcc44944 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-10-28 13:52:32 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-11-04 15:38:53 +0000 camcontrol: Plug a memory leak in getdevtree() PR: 275338 MFC after: 1 week (cherry picked from commit abfd031b482f92320e29a2c2ac80fcd23e134446) sbin/camcontrol/camcontrol.c | 1 + 1 file changed, 1 insertion(+)
Thanks for the report.