diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-22 23:58:46 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-22 23:58:46 +0200 |
commit | 60c950ac0859f93956eeab597b7cff95600fae6a (patch) | |
tree | 17f9150c95d3ed74c1a0c5fe8677e0e3d5a15daa /libavcodec/dwt.c | |
parent | ea5dab58e074a91330e1f076a4cbe8fece889afe (diff) | |
download | ffmpeg-60c950ac0859f93956eeab597b7cff95600fae6a.tar.gz |
dwt: use av_freep()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dwt.c')
-rw-r--r-- | libavcodec/dwt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/dwt.c b/libavcodec/dwt.c index 100aef535d..748bd40f32 100644 --- a/libavcodec/dwt.c +++ b/libavcodec/dwt.c @@ -39,7 +39,7 @@ void ff_slice_buffer_init(slice_buffer *buf, int line_count, return AVERROR(ENOMEM); buf->data_stack = av_malloc(sizeof(IDWTELEM *) * max_allocated_lines); if (!buf->data_stack) { - av_free(buf->line); + av_freep(&buf->line); return AVERROR(ENOMEM); } @@ -47,9 +47,9 @@ void ff_slice_buffer_init(slice_buffer *buf, int line_count, buf->data_stack[i] = av_malloc(sizeof(IDWTELEM) * line_width); if (!buf->data_stack[i]) { for (i--; i >=0; i--) - av_free(buf->data_stack[i]); - av_free(buf->data_stack); - av_free(buf->line); + av_freep(&buf->data_stack[i]); + av_freep(&buf->data_stack); + av_freep(&buf->line); return AVERROR(ENOMEM); } } |