[systemd-commits] src/shared
Lennart Poettering
lennart at kemper.freedesktop.org
Fri Sep 21 07:30:59 PDT 2012
src/shared/hwclock.c | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 4eeebf70aa5ac9825899f5a063431329904d37e5
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Sep 21 16:29:09 2012 +0200
hwclock: add missing OOM check
diff --git a/src/shared/hwclock.c b/src/shared/hwclock.c
index b93855d..0e8fa45 100644
--- a/src/shared/hwclock.c
+++ b/src/shared/hwclock.c
@@ -94,6 +94,11 @@ static int rtc_open(int flags) {
continue;
p = strappend("/dev/", de->d_name);
+ if (!p) {
+ closedir(d);
+ return -ENOMEM;
+ }
+
fd = open(p, flags);
free(p);
More information about the systemd-commits
mailing list