fix memory leak in encoder_close (#1366)

* fix memory leak in encoder_close

* add &
pull/1372/head
Dean Lee 5 years ago committed by GitHub
parent a4ad9d1f46
commit 3b3eebb137
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      selfdrive/loggerd/encoder.c

@ -635,6 +635,7 @@ void encoder_close(EncoderState *s) {
if (s->remuxing) {
av_write_trailer(s->ofmt_ctx);
avio_closep(&s->ofmt_ctx->pb);
avcodec_free_context(&s->codec_ctx);
avformat_free_context(s->ofmt_ctx);
} else {
fclose(s->of);

Loading…
Cancel
Save