[systemd-devel] [PATCH 5/5] manager: print p and then free it

Lukas Nykryn lnykryn at redhat.com
Fri Mar 1 09:30:01 PST 2013


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

diff --git a/src/core/manager.c b/src/core/manager.c
index ec12a75..5d1959e 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -2473,9 +2473,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;
                 }
         }
-- 
1.7.11.7



More information about the systemd-devel mailing list