AddCuePoint: fix memory leak on failure
quiets a static analysis warning Change-Id: I288ab6216ecd066f7d6542a7465db1f182859c32
This commit is contained in:
parent
b0cea9ce24
commit
da131dd350
@ -3386,8 +3386,10 @@ bool Segment::AddCuePoint(uint64_t timestamp, uint64_t track) {
|
||||
cue->set_block_number(cluster->blocks_added());
|
||||
cue->set_cluster_pos(cluster->position_for_cues());
|
||||
cue->set_track(track);
|
||||
if (!cues_.AddCue(cue))
|
||||
if (!cues_.AddCue(cue)) {
|
||||
delete cue;
|
||||
return false;
|
||||
}
|
||||
|
||||
new_cuepoint_ = false;
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user