chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
login: fix potential null pointer dereference
[elogind.git]
/
src
/
login
/
logind-session-device.c
diff --git
a/src/login/logind-session-device.c
b/src/login/logind-session-device.c
index 932abb82f960655564b714b75c209129fced93fc..656f268dba4eae34440005ec6a870359e7fb2608 100644
(file)
--- a/
src/login/logind-session-device.c
+++ b/
src/login/logind-session-device.c
@@
-19,16
+19,12
@@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <assert.h>
#include <fcntl.h>
#include <libudev.h>
#include <linux/input.h>
#include <fcntl.h>
#include <libudev.h>
#include <linux/input.h>
-#include <linux/ioctl.h>
#include <string.h>
#include <sys/ioctl.h>
#include <string.h>
#include <sys/ioctl.h>
-#include <sys/stat.h>
#include <sys/types.h>
#include <sys/types.h>
-#include <unistd.h>
#include "util.h"
#include "missing.h"
#include "util.h"
#include "missing.h"
@@
-107,7
+103,7
@@
static int sd_eviocrevoke(int fd) {
assert(fd >= 0);
assert(fd >= 0);
- r = ioctl(fd, EVIOCREVOKE,
1
);
+ r = ioctl(fd, EVIOCREVOKE,
NULL
);
if (r < 0) {
r = -errno;
if (r == -EINVAL && !warned) {
if (r < 0) {
r = -errno;
if (r == -EINVAL && !warned) {