DARWIN: Set workIPArray to nil in commitModify

Address potential memory issues by setting workIPArray to nil after
releasing it in commitModify. This prevents dangling pointers and
ensures consistency with rollbackModify, which already includes this
safeguard. Without this change, PrefPane can crash upon closing the
window used for setting IP addresses of cells in the CellServDB.

Change-Id: Iea56343d734f854b76b74c961d2df05bcf4a9332
Reviewed-on: https://gerrit.openafs.org/15962
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
This commit is contained in:
Marcio Barbosa 2024-07-22 02:25:02 -07:00 committed by Andrew Deason
parent b70419c623
commit e45d0bd1e1

View File

@ -49,6 +49,7 @@
[bkIPArray removeAllObjects];
[bkIPArray setArray:workIPArray];
[workIPArray release];
workIPArray = nil;
}
// -------------------------------------------------------------------------------