[systemd-devel] [PATCH 1/3] unit: check correct variable after strdup

Lukas Nykryn lnykryn at redhat.com
Tue Jul 9 06:45:36 PDT 2013


---
 src/core/unit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/unit.c b/src/core/unit.c
index 447f201..b3f9832 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2302,7 +2302,7 @@ int unit_deserialize(Unit *u, FILE *f, FDSet *fds) {
                         char *s;
 
                         s = strdup(v);
-                        if (!v)
+                        if (!s)
                                 return -ENOMEM;
 
                         free(u->cgroup_path);
-- 
1.8.1.4



More information about the systemd-devel mailing list