Nathalie Furmento 8 vuotta sitten
vanhempi
commit
920663d090

+ 5 - 0
examples/matvecmult/matvecmult.c

@@ -224,6 +224,11 @@ int main(int argc, char **argv)
         printArray(vector, width);
         printArray(mult, height);
 #endif
+
+	free(matrix);
+	free(vector);
+	free(mult);
+	free(correctResult);
         starpu_shutdown();
 
 	return (submit == -ENODEV) ? 77 : 0;

+ 6 - 1
examples/sched_ctx/parallel_code.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010-2014, 2016  Université de Bordeaux
- * Copyright (C) 2010-2015  CNRS
+ * Copyright (C) 2010-2016  CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -112,6 +112,8 @@ int main(int argc, char **argv)
 	if (nprocs1 < 4)
 	{
 		/* Not enough procs */
+		free(procs1);
+		free(procs2);
 		starpu_shutdown();
 		return 77;
 	}
@@ -218,5 +220,8 @@ enodev:
 	printf("ctx%d: tasks starpu executed %d out of %d\n", sched_ctx2, tasks_executed[1], NTASKS);
 	starpu_shutdown();
 
+	free(procs1);
+	free(procs2);
+
 	return (ret == -ENODEV ? 77 : 0);
 }

+ 6 - 4
tests/datawizard/invalidate_pending_requests.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010, 2016  Université de Bordeaux
- * Copyright (C) 2010, 2011, 2012, 2013  CNRS
+ * Copyright (C) 2010, 2011, 2012, 2013, 2016  CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -26,17 +26,18 @@
 int main(int argc, char **argv)
 {
 	int ret;
-	char *var = malloc(SIZE);
+	char *var = NULL;
 	starpu_data_handle_t handle;
 
 	ret = starpu_init(NULL);
-	if (ret == -ENODEV) return STARPU_TEST_SKIPPED;
+	if (ret == -ENODEV) goto skip;
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 
 	if (starpu_worker_get_count_by_type(STARPU_CUDA_WORKER) == 0 &&
 		starpu_worker_get_count_by_type(STARPU_OPENCL_WORKER) == 0)
 		goto enodev;
 
+	var = malloc(SIZE);
 	starpu_variable_data_register(&handle, STARPU_MAIN_RAM, (uintptr_t)var, SIZE);
 
 	/* Let a request fly */
@@ -48,12 +49,13 @@ int main(int argc, char **argv)
 	starpu_fxt_trace_user_event_string("invalidated");
 
 	starpu_data_unregister(handle);
-
+	free(var);
 	starpu_shutdown();
 
 	return 0;
 
 enodev:
 	starpu_shutdown();
+skip:
 	return STARPU_TEST_SKIPPED;
 }