]> granicus.if.org Git - gc/commit
Fix potential null dereference in GC_CONS
authorIvan Maidanski <ivmai@mail.ru>
Mon, 7 May 2018 21:47:48 +0000 (00:47 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 8 Jul 2018 21:06:25 +0000 (00:06 +0300)
commite39899acf9badd09e13a77710a8f43a608328c1d
tree9b2d92e8070edce65510f110b7987dbdddf3d660
parent40a8fd8c1d527b9c3b5d2c0cd5d2b1ea49319ac0
Fix potential null dereference in GC_CONS
(a cherry-pick of commit 0ff8f033 from 'master')

* include/gc_inline.h (GC_CONS): Remove grans local variable; replace
GC_FAST_MALLOC_GRANS(GC_malloc_kind) to GC_MALLOC_WORDS_KIND(n=2);
store second element only if result is non-null; store first element
along with second one.
include/gc_inline.h