mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-12-23 16:55:28 +00:00
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
This commit is contained in:
parent
06cede988b
commit
b2196565bd
|
@ -135,14 +135,19 @@ void MinidumpGenerator::GatherSystemInformation() {
|
||||||
CFURLCreateDataAndPropertiesFromResource(NULL, sys_vers, &data, NULL, NULL,
|
CFURLCreateDataAndPropertiesFromResource(NULL, sys_vers, &data, NULL, NULL,
|
||||||
&error);
|
&error);
|
||||||
|
|
||||||
if (!data)
|
if (!data) {
|
||||||
|
CFRelease(sys_vers);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CFDictionaryRef list = static_cast<CFDictionaryRef>
|
CFDictionaryRef list = static_cast<CFDictionaryRef>
|
||||||
(CFPropertyListCreateFromXMLData(NULL, data, kCFPropertyListImmutable,
|
(CFPropertyListCreateFromXMLData(NULL, data, kCFPropertyListImmutable,
|
||||||
NULL));
|
NULL));
|
||||||
if (!list)
|
if (!list) {
|
||||||
|
CFRelease(sys_vers);
|
||||||
|
CFRelease(data);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CFStringRef build_version = static_cast<CFStringRef>
|
CFStringRef build_version = static_cast<CFStringRef>
|
||||||
(CFDictionaryGetValue(list, CFSTR("ProductBuildVersion")));
|
(CFDictionaryGetValue(list, CFSTR("ProductBuildVersion")));
|
||||||
|
|
|
@ -475,6 +475,7 @@ NSString *const kDefaultServerType = @"google";
|
||||||
NSMutableDictionary *uploadParameters = [NSMutableDictionary dictionary];
|
NSMutableDictionary *uploadParameters = [NSMutableDictionary dictionary];
|
||||||
|
|
||||||
if (![self populateServerDictionary:uploadParameters]) {
|
if (![self populateServerDictionary:uploadParameters]) {
|
||||||
|
[upload release];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue