chiark / gitweb /
journalctl: show fields requested with --field in full
[elogind.git] / src / shared / virt.c
index fddb45d6e832e1e4106eae3f3e065078d21304d9..7b18e58c166f9d4cf21cda8d35f2da8a337e60a8 100644 (file)
@@ -168,7 +168,7 @@ int detect_vm(const char **id) {
 }
 
 int detect_container(const char **id) {
-        char *e = NULL;
+        char _cleanup_free_ *e = NULL;
         int r;
 
         /* Unfortunately many of these operations require root access
@@ -216,8 +216,6 @@ int detect_container(const char **id) {
                         *id = "other";
         }
 
-        free(e);
-
         return r;
 }