systemd/0005-cryptsetup-fix-an-OOM-check.patch

26 lines
1.0 KiB
Diff
Raw Normal View History

From 0e2f14014c65b4d8b30146e414579154cfa932da Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Thu, 23 Oct 2014 00:30:04 +0200
Subject: [PATCH] cryptsetup: fix an OOM check
---
src/cryptsetup/cryptsetup-generator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/cryptsetup/cryptsetup-generator.c src/cryptsetup/cryptsetup-generator.c
index 137b787..c7f30f6 100644
--- src/cryptsetup/cryptsetup-generator.c
+++ src/cryptsetup/cryptsetup-generator.c
@@ -387,7 +387,7 @@ int main(int argc, char *argv[]) {
if (k == 2 && streq(proc_uuid, device + 5)) {
free(options);
options = strdup(p);
- if (!proc_options) {
+ if (!options) {
log_oom();
goto cleanup;
}
--
1.7.9.2