Explorar el Código

Fix crash when STARPU_CHECK_LAUNCHER_ARGS is not defined

Samuel Thibault hace 10 años
padre
commit
70f3aa8240
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      tests/loader.c

+ 3 - 1
tests/loader.c

@@ -232,7 +232,9 @@ int main(int argc, char *argv[])
 
 	/* get launcher program */
 	launcher=getenv("STARPU_CHECK_LAUNCHER");
-	launcher_args=strdup(getenv("STARPU_CHECK_LAUNCHER_ARGS"));
+	launcher_args=getenv("STARPU_CHECK_LAUNCHER_ARGS");
+	if (launcher_args)
+		launcher_args=strdup(launcher_args);
 
 	/* get user-defined iter_max value */
 	if (getenv("STARPU_TIMEOUT_ENV"))