Skip to content

Commit

Permalink
Fix memory leak in ebur128_init.
Browse files Browse the repository at this point in the history
Found by Dan Dennedy here:
mltframework/mlt@9d35a6b

Luckily, the impact of the bug is very small, as this code path is not
executed when calling ebur128_init with a non-null mode parameter (which
should be always).
  • Loading branch information
jiixyj committed Sep 21, 2014
1 parent fbccd85 commit 2ba9ff9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ebur128/ebur128.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ ebur128_state* ebur128_init(unsigned int channels,
} else if ((mode & EBUR128_MODE_M) == EBUR128_MODE_M) {
st->d->audio_data_frames = st->d->samples_in_100ms * 4;
} else {
return NULL;
goto free_true_peak;
}
st->d->audio_data = (double*) malloc(st->d->audio_data_frames *
st->channels *
Expand Down

0 comments on commit 2ba9ff9

Please sign in to comment.