unit: check correct variable after strdup
authorLukas Nykryn <lnykryn@redhat.com>
Tue, 9 Jul 2013 13:45:36 +0000 (15:45 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 11 Jul 2013 23:09:34 +0000 (01:09 +0200)
src/core/unit.c

index dd08011..b245356 100644 (file)
@@ -2326,7 +2326,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);