libs: encoder: h264fei: don't free memory on stack
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Tue, 17 Dec 2019 15:49:47 +0000 (16:49 +0100)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Tue, 17 Dec 2019 17:31:29 +0000 (18:31 +0100)
commit47b0932911bc7b7043e16355ba39c722c0289029
treed282a8fe30948393cceacdc3e19f81c766abd97a
parent6ecbb8d100cc3ac71f2d52191c8a6527bc35498d
libs: encoder: h264fei: don't free memory on stack

Issue detected by Coverity

`info_to_pak` variable in gst_vaapi_encoder_h264_fei_encode() is
declared in the stack, but it is free in
gst_vaapi_feienc_h264_encode() as if declared on the heap.

This patch initializes the structure and removes the free.

A non-heap pointer is placed on the free list, likely causing a crash
later.

In gst_vaapi_encoder_h264_fei_encode: Free of an address-of
expression, which can never be heap allocated.
gst-libs/gst/vaapi/gstvaapiencoder_h264_fei.c
gst-libs/gst/vaapi/gstvaapifeienc_h264.c