diff options
| author | Joseph Myers <josmyers@redhat.com> | 2024-11-08 01:53:48 +0000 |
|---|---|---|
| committer | Joseph Myers <josmyers@redhat.com> | 2024-11-08 01:53:48 +0000 |
| commit | f745d78e2628cd5b13ca119ae0c0e21d08ad1906 (patch) | |
| tree | db7acd76c9167b073ccab858010bc3dc9aa7f30f /malloc/malloc.c | |
| parent | 97f60abd25628425971f07e9b0e7f8eec0741235 (diff) | |
| download | glibc-f745d78e2628cd5b13ca119ae0c0e21d08ad1906.tar.xz glibc-f745d78e2628cd5b13ca119ae0c0e21d08ad1906.zip | |
Avoid uninitialized result in sem_open when file does not exist
A static analyzer apparently reported an uninitialized use of the
variable result in sem_open in the case where the file is required to
exist but does not exist.
The report appears to be correct; set result to SEM_FAILED in that
case, and add a test for it.
Note: the test passes for me even without the sem_open fix, I guess
because result happens to get value SEM_FAILED (i.e. 0) when
uninitialized.
Tested for x86_64.
Diffstat (limited to 'malloc/malloc.c')
0 files changed, 0 insertions, 0 deletions
