ソースを参照

Fix crash when STARPU_CHECK_LAUNCHER_ARGS is not defined

Samuel Thibault 10 年 前
コミット
70f3aa8240
共有1 個のファイルを変更した3 個の追加1 個の削除を含む
  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"))