mfc: Fix leak of input/output buffer storage in the MFC decoder library

This commit is contained in:
Sebastian Dröge 2013-01-03 10:53:01 +01:00
parent c6d9191abe
commit 6e05f1ba12

View file

@ -472,6 +472,11 @@ void mfc_dec_destroy(struct mfc_dec_context *ctx)
munmap(ctx->output_buffer[i].plane[j].data, munmap(ctx->output_buffer[i].plane[j].data,
ctx->output_buffer[i].plane[j].length); ctx->output_buffer[i].plane[j].length);
} }
if (ctx->input_buffer)
free (ctx->input_buffer);
if (ctx->output_buffer)
free (ctx->output_buffer);
close(ctx->fd); close(ctx->fd);
pthread_mutex_lock(&mutex); pthread_mutex_lock(&mutex);
mfc_in_use = 0; mfc_in_use = 0;