diff options
author | Jakub Jelinek <jakub@redhat.com> | 2023-09-19 09:26:35 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2023-09-19 09:26:35 +0200 |
commit | 15345980633c502f0486a2e40e96224f49134130 (patch) | |
tree | 963456529a82f7752aecd0efe82c5d83ef36e47d /gcc/tree.cc | |
parent | 98c25cfc79a21886de7342fb563c4eb3c3d5f4e9 (diff) | |
download | gcc-15345980633c502f0486a2e40e96224f49134130.zip gcc-15345980633c502f0486a2e40e96224f49134130.tar.gz gcc-15345980633c502f0486a2e40e96224f49134130.tar.bz2 |
libgomp: Handle NULL environ like pointer to NULL pointer [PR111413]
clearenv function just sets environ to NULL (after sometimes freeing it),
rather than setting it to a pointer to NULL, and our code was assuming
it is always non-NULL.
Fixed thusly, the change seems to be large but actually is just
+ if (environ)
for (env = environ; *env != 0; env++)
plus reindentation. I've also noticed the block after this for loop
was badly indented (too much) and fixed that too.
No testcase added, as it needs clearenv + dlopen.
2023-09-19 Jakub Jelinek <jakub@redhat.com>
PR libgomp/111413
* env.c (initialize_env): Don't dereference environ if it is NULL.
Reindent.
Diffstat (limited to 'gcc/tree.cc')
0 files changed, 0 insertions, 0 deletions