mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 19:31:12 +00:00
tests:va: Fix null ptr dereference in multi-vpp
Dereference the pointer err before null check, which raised a null pointer dereference issue by Coverity. Modify it to do the null check of err first, then dereference it. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1143>
This commit is contained in:
parent
4a6cc431d2
commit
b57df4cfd1
1 changed files with 7 additions and 4 deletions
|
@ -140,12 +140,15 @@ message_handler (GstBus * bus, GstMessage * msg, gpointer data)
|
|||
GError *err = NULL;
|
||||
|
||||
gst_message_parse_error (msg, &err, &debug);
|
||||
|
||||
if (err) {
|
||||
gst_printerrln ("GStreamer error: %s\n%s", err->message,
|
||||
debug ? debug : "");
|
||||
g_error_free (err);
|
||||
}
|
||||
|
||||
if (debug)
|
||||
g_free (debug);
|
||||
if (err)
|
||||
g_error_free (err);
|
||||
|
||||
g_main_loop_quit (app->loop);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue