mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 10:37:22 +00:00
Check return value from open() in ipmi_start_daemon() (Coverity CID CID 1148983).
This commit is contained in:
parent
4698e667f5
commit
4e220bebb0
@ -44,6 +44,7 @@
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
@ -663,9 +664,10 @@ ipmi_start_daemon(struct ipmi_intf *intf)
|
||||
close(fd);
|
||||
}
|
||||
|
||||
open("/dev/null", O_RDWR);
|
||||
dup(0);
|
||||
dup(0);
|
||||
fd = open("/dev/null", O_RDWR);
|
||||
assert(0 == fd);
|
||||
dup(fd);
|
||||
dup(fd);
|
||||
}
|
||||
|
||||
/* is_fru_id - wrapper for str-2-int FRU ID conversion. Message is printed
|
||||
|
Loading…
x
Reference in New Issue
Block a user