Fix: Use after free on spawn_sessiond error path in check_sessiond
[lttng-tools.git] / src / bin / lttng / lttng.c
index 85621444c32cb1b34f217dc2ec95ae9315c8cf29..be673f94f2d0ab552c4f9daa3f90bff70637b2d1 100644 (file)
@@ -374,13 +374,12 @@ static int check_sessiond(void)
                }
 
                ret = spawn_sessiond(pathname);
-               free(alloc_pathname);
                if (ret < 0) {
                        ERR("Problem occurred when starting %s", pathname);
-                       goto end;
                }
-       }
 
+               free(alloc_pathname);
+       }
 end:
        return ret;
 }
This page took 0.023961 seconds and 5 git commands to generate.