Mac installer and uninstaller: eliminate minor memory leaks.

This commit is contained in:
Charlie Fenton 2013-06-18 05:03:45 -07:00
parent bbc3719f48
commit 53d28e5faa
2 changed files with 9 additions and 3 deletions

View File

@ -1207,7 +1207,10 @@ static Boolean ShowMessage(Boolean allowCancel, const char *format, ...) {
&responseFlags);
CFRelease(myString);
if (myIconURLRef) CFRelease(myIconURLRef);
if (myString) CFRelease(myString);
if (yes) CFRelease(yes);
if (no) CFRelease(no);
if (retval) return false;
return (responseFlags == kCFUserNotificationDefaultResponse);

View File

@ -1439,8 +1439,11 @@ static Boolean ShowMessage(Boolean allowCancel, Boolean continueButton, const ch
continueButton? continueString : NULL, allowCancel ? cancelString : NULL, NULL,
&responseFlags);
CFRelease(myString);
if (myIconURLRef) CFRelease(myIconURLRef);
if (myString) CFRelease(myString);
if (theTitle) CFRelease(theTitle);
if (cancelString) CFRelease(cancelString);
if (continueString) CFRelease(continueString);
if (retval) return false;
// Return TRUE if user clicked Continue or OK, FALSE if user clicked Cancel