Issue detected by Coverity
`info_to_pack.h264_slice_header` is always allocated by
gst_vaapi_feipak_h264_encode(), thus checking it to free it afterwards
in doesn't make much sense. But it requires to be free on the error
path.
There may be a null pointer dereference, or else the comparison
against null is unnecessary.
In gst_vaapi_encoder_h264_fei_encode: All paths that lead to this null
pointer comparison already dereference the pointer earlier
}
/* Free the slice array */
- if (info_to_pak.h264_slice_headers)
- g_array_free (info_to_pak.h264_slice_headers, TRUE);
+ g_array_free (info_to_pak.h264_slice_headers, TRUE);
gst_vaapi_enc_picture_unref (picture2);
} else {
reconstruct);
if (picture2)
gst_vaapi_enc_picture_unref (picture2);
+ if (info_to_pak.h264_slice_headers)
+ g_array_free (info_to_pak.h264_slice_headers, TRUE);
return status;
}
}