diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2017-04-28 19:43:49 +0200 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2017-04-28 21:01:43 +0200 |
commit | d108ed2251f1f402755d862e83ab0944c552f5c6 (patch) | |
tree | 7ebe9d15eb6bbb1aaf3703c27331186876262b86 | |
parent | 46e8be110d1ba0db2f10c3c95a18ded7a6fc116b (diff) |
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
-rw-r--r-- | gst/gst.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1003,7 +1003,7 @@ gst_deinit (void) } g_thread_pool_set_max_unused_threads (0); bin_class = GST_BIN_CLASS (g_type_class_peek (gst_bin_get_type ())); - if (bin_class->pool != NULL) { + if (bin_class && bin_class->pool != NULL) { g_thread_pool_free (bin_class->pool, FALSE, TRUE); bin_class->pool = NULL; } |