CID 611239: Fix resource leak
This commit is contained in:
parent
902a98ad83
commit
2d5785ba12
@ -361,8 +361,11 @@ BSoundFile::_ref_to_file(const entry_ref *ref)
|
||||
raw = &mf.u.raw_audio;
|
||||
}
|
||||
|
||||
if (raw == NULL)
|
||||
if (raw == NULL) {
|
||||
delete media;
|
||||
delete file;
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
fSamplingRate = (int)raw->frame_rate;
|
||||
fChannelCount = raw->channel_count;
|
||||
|
Loading…
x
Reference in New Issue
Block a user