From 6358471ca833cb950a66bc5ec4c63f8b1797ab98 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Tue, 5 Nov 2013 12:12:15 +0100 Subject: [PATCH] Fix memory leaks. --- MP42/MP42File.m | 1 + MP42/MP42Metadata.m | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/MP42/MP42File.m b/MP42/MP42File.m index de71d5d..497bdf1 100644 --- a/MP42/MP42File.m +++ b/MP42/MP42File.m @@ -201,6 +201,7 @@ NSString * const MP42OrganizeAlternateGroups = @"MP42AlternateGroups"; [[self chapters] chapterAtIndex:currentSampleNum - 1].image = frame; + [frameData release]; [frame release]; free(pBytes); } diff --git a/MP42/MP42Metadata.m b/MP42/MP42Metadata.m index 227803a..6de6998 100644 --- a/MP42/MP42Metadata.m +++ b/MP42/MP42Metadata.m @@ -935,7 +935,7 @@ static const genreType_t genreType_strings[] = { NSArray *ratingItems = [ratingString componentsSeparatedByRegex:splitElements]; [ratingString release]; if ([ratingItems count] > 2) - ratingiTunesCode = [[NSString stringWithFormat:@"%@|%@|%@|",[ratingItems objectAtIndex:0], [ratingItems objectAtIndex:1], [ratingItems objectAtIndex:2]] retain]; + ratingiTunesCode = [NSString stringWithFormat:@"%@|%@|%@|",[ratingItems objectAtIndex:0], [ratingItems objectAtIndex:1], [ratingItems objectAtIndex:2]]; else ratingiTunesCode = nil;