mirror of
https://github.com/stefanberger/swtpm.git
synced 2026-02-03 19:58:33 +00:00
Do not call close() with a negative value
Check the value of *pidfilefd before calling close(*pidfilefd). Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
parent
5b63c5dbff
commit
39f684b39a
@ -473,7 +473,8 @@ parse_pid_options(char *options, char **pidfile, int *pidfilefd)
|
||||
|
||||
error:
|
||||
option_values_free(ovs);
|
||||
close(*pidfilefd);
|
||||
if (*pidfilefd >= 0)
|
||||
close(*pidfilefd);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user