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 <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
#if HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
@ -663,9 +664,10 @@ ipmi_start_daemon(struct ipmi_intf *intf)
|
|||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
open("/dev/null", O_RDWR);
|
fd = open("/dev/null", O_RDWR);
|
||||||
dup(0);
|
assert(0 == fd);
|
||||||
dup(0);
|
dup(fd);
|
||||||
|
dup(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* is_fru_id - wrapper for str-2-int FRU ID conversion. Message is printed
|
/* is_fru_id - wrapper for str-2-int FRU ID conversion. Message is printed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user