diff options
author | Paul Smith <psmith@gnu.org> | 2022-10-31 01:48:33 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2022-10-31 02:23:04 -0400 |
commit | 38b19976f50af0c898030adcb86320bdfe52a159 (patch) | |
tree | 2f4d350dba8ac492185a28546535d9d5df71901c /src/posixos.c | |
parent | 1dd52ab472e9dffa0cbdcdc68f196b64ce2abfc4 (diff) | |
download | make-git-38b19976f50af0c898030adcb86320bdfe52a159.tar.gz |
Fix issues found by ASAN and Coverity
* tests/test_driver.pl: Preserve the LSAN_OPTIONS variable.
* tests/scripts/targets/ONESHELL: Don't set a local variable.
* tests/scripts/functions/let: Test empty let variable.
* src/posixos.c (osync_parse_mutex): Free existing osync_tmpfile.
* src/misc.c (get_tmpfd): Set umask() before invoking mkstemp().
* src/ar.c (ar_parse_name): Check invalid name (shouldn't happen).
* src/function.c (define_new_function): Free previous function entry
when replacing it with a new one.
* src/job.c (child_execute_job): Initialize pid for safety.
(construct_command_argv_internal): In oneshell mode ensure that the
returned argv has the right format (0th element is a pointer to the
entire buffer).
Diffstat (limited to 'src/posixos.c')
-rw-r--r-- | src/posixos.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/posixos.c b/src/posixos.c index 63201b40..44aeb346 100644 --- a/src/posixos.c +++ b/src/posixos.c @@ -673,6 +673,7 @@ osync_parse_mutex (const char *mutex) return 0; } + free (osync_tmpfile); osync_tmpfile = xstrdup (mutex + CSTRLEN (MUTEX_PREFIX)); EINTRLOOP (osync_handle, open (osync_tmpfile, O_WRONLY)); |