udev: check return value of write

This commit is contained in:
Václav Pavlín
2012-09-23 14:24:43 +02:00
committed by Kay Sievers
parent 6bb2f0a08a
commit cb32f0141e
+4 -1
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;
}
}
}