gst: check non-null before dereference
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fri, 28 Apr 2017 17:43:49 +0000 (19:43 +0200)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fri, 28 Apr 2017 19:01:43 +0000 (21:01 +0200)
commitd108ed2251f1f402755d862e83ab0944c552f5c6
tree7ebe9d15eb6bbb1aaf3703c27331186876262b86
parent46e8be110d1ba0db2f10c3c95a18ded7a6fc116b
gst: check non-null before dereference

It is possible to use gst_deinit() without registering the base
classes. For example, when using gst_init_get_option_group() and
call the program with an invalid parameter. In that case,
gst_deinit() will lead to a segmentation fault, since there is a
dereference to a pointer that is null.

This patch validates if the type is non-null before dereferencing
it.

https://bugzilla.gnome.org/show_bug.cgi?id=781914
gst/gst.c