diff options
author | Václav Pavlín <vpavlin@redhat.com> | 2012-09-21 13:51:45 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-09-23 14:24:43 +0200 |
commit | cb32f0141ead382a972f86f144b9500f2414166f (patch) | |
tree | 57afd15864e68e41b8d56ddf6953741e08704bb4 /src/udev/collect | |
parent | 6bb2f0a08a321eb165b28de1584884bdfc0c27ee (diff) | |
download | systemd-cb32f0141ead382a972f86f144b9500f2414166f.tar.gz |
udev: check return value of write
Diffstat (limited to 'src/udev/collect')
-rw-r--r-- | src/udev/collect/collect.c | 5 |
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; + } } } |