chiark / gitweb /
coverity: fix a couple of bugs found by coverity
[elogind.git] / src / service.c
index 2b45ecb71547f5d3d21d328c2b7843f76253a9b9..2ae8785ac4e484f13fe21d8fa25beac85752a1b4 100644 (file)
@@ -3115,7 +3115,7 @@ static int service_enumerate(Manager *m) {
 
                                 free(fpath);
                                 fpath = join(path, "/", de->d_name, NULL);
-                                if (!path) {
+                                if (!fpath) {
                                         r = -ENOMEM;
                                         goto finish;
                                 }