Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/dwt.c8
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);
}
}