OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_2-331-g451649e
Gerrit Code Review
gerrit@openafs.org
Tue, 21 Oct 2025 16:17:44 -0400
The following commit has been merged in the master branch:
commit 451649e0120122d96632d534c5419d756d864a87
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Fri Aug 29 18:41:01 2025 -0400
DARWIN: Autorelease strData in readTheseCell()
Since the introduction of the OpenAFS prefpane (commit 694c5ca3f400 'OSX
Preference Pane Source Import'), readTheseCell() has alloc'd strData but
provided no way for it to be released. This results in a memory leak
(proportional to the size of the contents of the TheseCells file) on
every call to readTheseCell().
Since readTheseCell() is called frequently (at least every 60 seconds),
this small memory leak can become substantial over time.
Call 'autorelease' on strData, so it gets released at some point in the
future (when the current autorelease pool ends, or is drained). But it
will be valid for at least the rest of readTheseCell(), so we can call
componentsSeparatedByString() on it before returning.
Discovered via the macOS 'leaks' utility.
Change-Id: I62f78aea0995f67c61838409ef9ee83e1c4aa799
Reviewed-on: https://gerrit.openafs.org/16536
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
src/platform/DARWIN/AFSPreference/AFSPropertyManager.m | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--
OpenAFS Master Repository