chiark / gitweb /
manager: print p and then free it
authorLukas Nykryn <lnykryn@redhat.com>
Fri, 1 Mar 2013 17:30:01 +0000 (18:30 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 1 Mar 2013 21:43:57 +0000 (16:43 -0500)
src/core/manager.c

index 4242398..d976581 100644 (file)
@@ -2479,9 +2479,9 @@ static int create_generator_dir(Manager *m, char **generator, const char *name)
                         return log_oom();
 
                 if (!mkdtemp(p)) {
-                        free(p);
                         log_error("Failed to create generator directory %s: %m",
                                   p);
+                        free(p);
                         return -errno;
                 }
         }