mirror of
https://github.com/pyenv/pyenv.git
synced 2026-09-10 07:36:16 -04:00
revert: remove false-positive use-after-free fix in realpath_builtin
The added `realbuf = NULL` after `free(realbuf)` was not a real fix.
`realbuf` is unconditionally overwritten by `realpath(p, NULL)` at the
start of every loop iteration, so the freed pointer is never read.
There is no reachable use-after-free; the defensive null assignment was
a no-op. Reverts cd49b2e7.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
cd49b2e7c1
commit
c969a79c49
|
|
@ -21,7 +21,6 @@ int realpath_builtin(WORD_LIST *list)
|
|||
} else {
|
||||
printf("%s\n", realbuf);
|
||||
free(realbuf);
|
||||
realbuf = NULL;
|
||||
}
|
||||
}
|
||||
return es;
|
||||
|
|
|
|||
Loading…
Reference in a new issue