From 7c7a537475fca02f426a0895218cc69086840483 Mon Sep 17 00:00:00 2001 From: yicheng <11733500+yichengchen@users.noreply.github.com> Date: Fri, 10 Jul 2020 20:17:27 +0800 Subject: [PATCH] fix: crash in proxy tool --- ProxyConfigHelper/ProxySettingTool.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ProxyConfigHelper/ProxySettingTool.m b/ProxyConfigHelper/ProxySettingTool.m index 87fad4f..ef6a052 100644 --- a/ProxyConfigHelper/ProxySettingTool.m +++ b/ProxyConfigHelper/ProxySettingTool.m @@ -119,8 +119,10 @@ CFRelease(store); return nil; } - CFRelease(result); - result = NULL; + if (result != NULL) { + CFRelease(result); + result = NULL; + } CFRelease(store); char *dir = getpwuid(uid)->pw_dir; NSString *path = [NSString stringWithUTF8String:dir];