cgit.c: Do not restore unset environment variables
getenv() returns a NULL pointer if the specified variable name cannot be
found in the environment. However, some setenv() implementations crash
if a NULL pointer is passed as second argument. Only restore variables
that are not NULL.
See commit d96d2c98eb
for a related patch.
Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
This commit is contained in:
parent
410da3ac1c
commit
8d8e84e72a
Loading…
Reference in New Issue
Block a user