From e45d0bd1e1ff500ace7b50ad7ea83d8ddf8b7e1c Mon Sep 17 00:00:00 2001 From: Marcio Barbosa Date: Mon, 22 Jul 2024 02:25:02 -0700 Subject: [PATCH] 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 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Mark Vitale --- src/platform/DARWIN/AFSPreference/IpConfiguratorCommander.m | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform/DARWIN/AFSPreference/IpConfiguratorCommander.m b/src/platform/DARWIN/AFSPreference/IpConfiguratorCommander.m index 70a50abb78..9768785ff4 100644 --- a/src/platform/DARWIN/AFSPreference/IpConfiguratorCommander.m +++ b/src/platform/DARWIN/AFSPreference/IpConfiguratorCommander.m @@ -49,6 +49,7 @@ [bkIPArray removeAllObjects]; [bkIPArray setArray:workIPArray]; [workIPArray release]; + workIPArray = nil; } // -------------------------------------------------------------------------------