]> granicus.if.org Git - p11-kit/commit
modules: check gl.modules before iterates on it when freeing
authorStefano Garzarella <sgarzare@redhat.com>
Wed, 27 Feb 2019 11:25:20 +0000 (12:25 +0100)
committerDaiki Ueno <ueno@gnu.org>
Wed, 27 Feb 2019 13:39:57 +0000 (14:39 +0100)
commit4a925177a81c2566d2a81a0a450607a5ff4d9048
tree2fd2a2aa0a69443b4fc628fa9071a7d9fa6f5be8
parente2170b295992cb7fdf115227a78028ac3780619f
modules: check gl.modules before iterates on it when freeing

In some circumstances, as described in the BZ, can happen that
free_modules_when_no_refs_unlocked() is called multiple times
when the module destructor is invoked.
We should check gl.modules before iterates on it in the
free_modules_when_no_refs_unlocked() functions, to avoid
a SIGSEGV.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1680963
p11-kit/modules.c