summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
authorVáclav Pavlín <vpavlin@redhat.com>2012-09-21 13:51:45 +0200
committerKay Sievers <kay@vrfy.org>2012-09-23 14:24:43 +0200
commitcb32f0141ead382a972f86f144b9500f2414166f (patch)
tree57afd15864e68e41b8d56ddf6953741e08704bb4 /src/udev
parent6bb2f0a08a321eb165b28de1584884bdfc0c27ee (diff)
udev: check return value of write
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/collect/collect.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c
index 47c2ddd63e..feae4bb6ba 100644
--- a/src/udev/collect/collect.c
+++ b/src/udev/collect/collect.c
@@ -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;
+ }
}
}