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;
|
CMItemCount timingArrayEntriesNeededOut = 0;
|
||||||
err = CMSampleBufferGetSampleTimingInfoArray(sampleBuffer, timingArrayEntries, NULL, &timingArrayEntriesNeededOut);
|
err = CMSampleBufferGetSampleTimingInfoArray(sampleBuffer, timingArrayEntries, NULL, &timingArrayEntriesNeededOut);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
CFRelease(sampleBuffer);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -909,6 +910,8 @@
|
|||||||
timingArrayEntries = timingArrayEntriesNeededOut;
|
timingArrayEntries = timingArrayEntriesNeededOut;
|
||||||
err = CMSampleBufferGetSampleTimingInfoArray(sampleBuffer, timingArrayEntries, timingArrayOut, &timingArrayEntriesNeededOut);
|
err = CMSampleBufferGetSampleTimingInfoArray(sampleBuffer, timingArrayEntries, timingArrayOut, &timingArrayEntriesNeededOut);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
free(timingArrayOut);
|
||||||
|
CFRelease(sampleBuffer);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -917,6 +920,8 @@
|
|||||||
CMItemCount sizeArrayEntriesNeededOut = 0;
|
CMItemCount sizeArrayEntriesNeededOut = 0;
|
||||||
err = CMSampleBufferGetSampleSizeArray(sampleBuffer, sizeArrayEntries, NULL, &sizeArrayEntriesNeededOut);
|
err = CMSampleBufferGetSampleSizeArray(sampleBuffer, sizeArrayEntries, NULL, &sizeArrayEntriesNeededOut);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
free(timingArrayOut);
|
||||||
|
CFRelease(sampleBuffer);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -924,6 +929,9 @@
|
|||||||
sizeArrayEntries = sizeArrayEntriesNeededOut;
|
sizeArrayEntries = sizeArrayEntriesNeededOut;
|
||||||
err = CMSampleBufferGetSampleSizeArray(sampleBuffer, sizeArrayEntries, sizeArrayOut, &sizeArrayEntriesNeededOut);
|
err = CMSampleBufferGetSampleSizeArray(sampleBuffer, sizeArrayEntries, sizeArrayOut, &sizeArrayEntriesNeededOut);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
free(timingArrayOut);
|
||||||
|
free(sizeArrayOut);
|
||||||
|
CFRelease(sampleBuffer);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,8 @@
|
|||||||
drc:settings.drc
|
drc:settings.drc
|
||||||
magicCookie:magicCookie error:error];
|
magicCookie:magicCookie error:error];
|
||||||
|
|
||||||
|
free(channelLayout);
|
||||||
|
|
||||||
if (!_decoder) {
|
if (!_decoder) {
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,11 @@
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)dealloc
|
||||||
|
{
|
||||||
|
free(_edits);
|
||||||
|
}
|
||||||
|
|
||||||
- (void)addSample:(MP42SampleBuffer *)sample {
|
- (void)addSample:(MP42SampleBuffer *)sample {
|
||||||
|
|
||||||
if (sample->attachments) {
|
if (sample->attachments) {
|
||||||
|
|||||||
@@ -12,6 +12,9 @@
|
|||||||
|
|
||||||
- (void)dealloc {
|
- (void)dealloc {
|
||||||
free(data);
|
free(data);
|
||||||
|
if (attachments) {
|
||||||
|
CFRelease(attachments);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
Reference in new issue
Block a user