]> granicus.if.org Git - gc/commit
Eliminate 'null dereference' code defect warning in register_finalizer
authorIvan Maidanski <ivmai@mail.ru>
Sat, 29 Oct 2016 14:49:37 +0000 (17:49 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Sat, 29 Oct 2016 14:49:37 +0000 (17:49 +0300)
commitb280a10c850e05581d8eec8eb10b49b49e442aa5
treeb3f07d029fef4d010dd47e51580e416085333dc0
parent51260a32883c2824adcd44f69185e0cb2db39153
Eliminate 'null dereference' code defect warning in register_finalizer

* finalize.c (GC_register_finalizer_inner): Add GC_ASSERT that fn is
non-zero (instead of specifying this in a comment) for the case when
new_fo is non-NULL (new_fo is returned by GC_oom_fn).
* finalize.c [LINT2] (GC_register_finalizer_inner): Call ABORT if hhdr
is NULL (for the case when new_fo is non-NULL).
finalize.c