Fix some small leaks.
This commit is contained in:
1 parent
bf379b5e11
commit
aa88938cd9
4 files changed
+18
No files matched your search
@@ -902,6 +902,7 @@
|
||||
CMItemCount timingArrayEntriesNeededOut = 0;
|
||||
err = CMSampleBufferGetSampleTimingInfoArray(sampleBuffer, timingArrayEntries, NULL, &timingArrayEntriesNeededOut);
|
||||
if (err) {
|
||||
CFRelease(sampleBuffer);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -909,6 +910,8 @@
|
||||
timingArrayEntries = timingArrayEntriesNeededOut;
|
||||
err = CMSampleBufferGetSampleTimingInfoArray(sampleBuffer, timingArrayEntries, timingArrayOut, &timingArrayEntriesNeededOut);
|
||||
if (err) {
|
||||
free(timingArrayOut);
|
||||
CFRelease(sampleBuffer);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -917,6 +920,8 @@
|
||||
CMItemCount sizeArrayEntriesNeededOut = 0;
|
||||
err = CMSampleBufferGetSampleSizeArray(sampleBuffer, sizeArrayEntries, NULL, &sizeArrayEntriesNeededOut);
|
||||
if (err) {
|
||||
free(timingArrayOut);
|
||||
CFRelease(sampleBuffer);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -924,6 +929,9 @@
|
||||
sizeArrayEntries = sizeArrayEntriesNeededOut;
|
||||
err = CMSampleBufferGetSampleSizeArray(sampleBuffer, sizeArrayEntries, sizeArrayOut, &sizeArrayEntriesNeededOut);
|
||||
if (err) {
|
||||
free(timingArrayOut);
|
||||
free(sizeArrayOut);
|
||||
CFRelease(sampleBuffer);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,8 @@
|
||||
drc:settings.drc
|
||||
magicCookie:magicCookie error:error];
|
||||
|
||||
free(channelLayout);
|
||||
|
||||
if (!_decoder) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -56,6 +56,11 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
free(_edits);
|
||||
}
|
||||
|
||||
- (void)addSample:(MP42SampleBuffer *)sample {
|
||||
|
||||
if (sample->attachments) {
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
|
||||
- (void)dealloc {
|
||||
free(data);
|
||||
if (attachments) {
|
||||
CFRelease(attachments);
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user