aboutsummaryrefslogtreecommitdiff
path: root/src/client/mac
diff options
context:
space:
mode:
authorstuartmorgan <stuartmorgan@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-11-14 13:16:19 +0000
committerstuartmorgan <stuartmorgan@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-11-14 13:16:19 +0000
commitb2196565bd75bfb1a74326ddb1c3956fedf70431 (patch)
tree85209536928665f02f489824eba01a9fe6152444 /src/client/mac
parentAllow CrashGenerationClient to request that a dump of the parent process be w... (diff)
downloadbreakpad-b2196565bd75bfb1a74326ddb1c3956fedf70431.tar.xz
Fix several error-case leaks on the Mac found by clang analysis
Review URL: http://breakpad.appspot.com/325001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@884 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac')
-rw-r--r--src/client/mac/handler/minidump_generator.cc9
-rw-r--r--src/client/mac/sender/uploader.m1
2 files changed, 8 insertions, 2 deletions
diff --git a/src/client/mac/handler/minidump_generator.cc b/src/client/mac/handler/minidump_generator.cc
index 68d7903a..1e4ea6b5 100644
--- a/src/client/mac/handler/minidump_generator.cc
+++ b/src/client/mac/handler/minidump_generator.cc
@@ -135,14 +135,19 @@ void MinidumpGenerator::GatherSystemInformation() {
CFURLCreateDataAndPropertiesFromResource(NULL, sys_vers, &data, NULL, NULL,
&error);
- if (!data)
+ if (!data) {
+ CFRelease(sys_vers);
return;
+ }
CFDictionaryRef list = static_cast<CFDictionaryRef>
(CFPropertyListCreateFromXMLData(NULL, data, kCFPropertyListImmutable,
NULL));
- if (!list)
+ if (!list) {
+ CFRelease(sys_vers);
+ CFRelease(data);
return;
+ }
CFStringRef build_version = static_cast<CFStringRef>
(CFDictionaryGetValue(list, CFSTR("ProductBuildVersion")));
diff --git a/src/client/mac/sender/uploader.m b/src/client/mac/sender/uploader.m
index 4f34d4db..f215018e 100644
--- a/src/client/mac/sender/uploader.m
+++ b/src/client/mac/sender/uploader.m
@@ -475,6 +475,7 @@ NSString *const kDefaultServerType = @"google";
NSMutableDictionary *uploadParameters = [NSMutableDictionary dictionary];
if (![self populateServerDictionary:uploadParameters]) {
+ [upload release];
return;
}