Detect realloc failure 13/13313/3
authorBenjamin Kaduk <kaduk@mit.edu>
Sun, 2 Sep 2018 02:47:39 +0000 (21:47 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 6 Nov 2020 03:49:43 +0000 (22:49 -0500)
commita912a29a4568e20af8b354fc901c557d67aca1f7
treee463e0181522e0a9d59a2a9bc92ea1f4a7e543ec
parent7ede3fa17f1ba419e4b5febd36ccdc3af38f92bc
Detect realloc failure

While reviewing other commits, a call to realloc() was discovered that
would leak memory on failure (by virtue of always assigning the realloc()
return value to the pointer holding the input address, even when the
return value is NULL).  Check for failure and return early in that case
(giving an incomplete list of events).

Change-Id: Ic6e889f1d990bd289812ce4bf8e9cd4ebce488ec
Reviewed-on: https://gerrit.openafs.org/13313
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/volser/volprocs.c