Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib/gshadow.c: Don't exit(3) on error in library code
We recently replaced bogus REALLOC() calls that didn't correctly handle errors. We replaced them by XREALLOC(), which at least would exit and avoid triggering undefined or unexpected behavior. Now that we've made the function way simpler, we can handle these errors by returning NULL, and handling the NULL in the caller. Fixes: 4eed3e8 ("lib/gshadow.c: Use XREALLOC() instead of silently continuing on ENOMEM") Cc: Serge Hallyn <[email protected]> Signed-off-by: Alejandro Colomar <[email protected]>
- Loading branch information