]> Savannah Git Hosting - gnulib.git/commit
xalloc: delay setting size until success
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 1 Apr 2021 07:59:54 +0000 (00:59 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 1 Apr 2021 08:04:45 +0000 (01:04 -0700)
commit152be6db1b016ed2a510ddc3895a937b21fbd538
treeb35eea45ff5162ab6007046287511bb32033df4d
parente54b645fc6b8422562327443bda575c65d931fbd
xalloc: delay setting size until success

* lib/xalloc.h (x2nrealloc): Don’t change *PN until after xrealloc
succeeds, in case xalloc_die or one of its callees or longjmp
targets uses *PN.  Similar code in xpalloc already does this.
ChangeLog
lib/xalloc.h