summaryrefslogtreecommitdiff
path: root/libavcodec/sonic.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-23 19:45:39 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-06-23 19:45:39 +0200
commit9375f5003d0262c7c4740d85777277b99432335b (patch)
tree79d260fdc580a92f30fb707e0ee3472436249cf8 /libavcodec/sonic.c
parent69d0a2922f76e4e121c9f434bdf29f55b26c0c66 (diff)
downloadffmpeg-9375f5003d0262c7c4740d85777277b99432335b.tar.gz
sonic: use av_freep() as its safer than av_free()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/sonic.c')
-rw-r--r--libavcodec/sonic.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c
index 788bea6749..9636c31f3b 100644
--- a/libavcodec/sonic.c
+++ b/libavcodec/sonic.c
@@ -602,13 +602,13 @@ static av_cold int sonic_encode_close(AVCodecContext *avctx)
int i;
for (i = 0; i < s->channels; i++)
- av_free(s->coded_samples[i]);
+ av_freep(&s->coded_samples[i]);
- av_free(s->predictor_k);
- av_free(s->tail);
- av_free(s->tap_quant);
- av_free(s->window);
- av_free(s->int_samples);
+ av_freep(&s->predictor_k);
+ av_freep(&s->tail);
+ av_freep(&s->tap_quant);
+ av_freep(&s->window);
+ av_freep(&s->int_samples);
return 0;
}
@@ -838,14 +838,14 @@ static av_cold int sonic_decode_close(AVCodecContext *avctx)
SonicContext *s = avctx->priv_data;
int i;
- av_free(s->int_samples);
- av_free(s->tap_quant);
- av_free(s->predictor_k);
+ av_freep(&s->int_samples);
+ av_freep(&s->tap_quant);
+ av_freep(&s->predictor_k);
for (i = 0; i < s->channels; i++)
{
- av_free(s->predictor_state[i]);
- av_free(s->coded_samples[i]);
+ av_freep(&s->predictor_state[i]);
+ av_freep(&s->coded_samples[i]);
}
return 0;