1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-13 12:58:20 +03:00

udev: check return value of write

This commit is contained in:
Václav Pavlín 2012-09-21 13:51:45 +02:00 committed by Kay Sievers
parent 6bb2f0a08a
commit cb32f0141e

View File

@ -305,7 +305,10 @@ static int missing(int fd)
buf = tmpbuf;
}
snprintf(buf, strlen(him->name)+2, "%s ", him->name);
write(fd, buf, strlen(buf));
if (write(fd, buf, strlen(buf)) < 0) {
free(buf);
return -1;
}
}
}