libs: encoder: h264fei: remove unnecessary check

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
This commit is contained in:
Víctor Manuel Jáquez Leal 2019-12-17 17:09:37 +01:00
parent f82cec2ce3
commit 4bb41e6ca3

View file

@ -2823,7 +2823,6 @@ gst_vaapi_encoder_h264_fei_encode (GstVaapiEncoder * base_encoder,
}
/* Free the slice array */
if (info_to_pak.h264_slice_headers)
g_array_free (info_to_pak.h264_slice_headers, TRUE);
gst_vaapi_enc_picture_unref (picture2);
@ -2841,6 +2840,8 @@ error:
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;
}
}