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.
GstVaapiEncoderStatus status = GST_VAAPI_ENCODER_STATUS_ERROR_UNKNOWN;
GstVaapiSurfaceProxy *reconstruct = NULL;
GstVaapiEncPicture *picture2 = NULL;
- GstVaapiFeiInfoToPakH264 info_to_pak;
+ GstVaapiFeiInfoToPakH264 info_to_pak = { {0} };
reconstruct = gst_vaapi_encoder_create_surface (base_encoder);
return GST_VAAPI_ENCODER_STATUS_SUCCESS;
error:
- g_slice_free (GstVaapiFeiInfoToPakH264, info_to_pak);
return ret;
}