浏览代码

tests/main/insert_task_dyn_handles.c: free allocated memory

Nathalie Furmento 10 年之前
父节点
当前提交
daea09fa16
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      tests/main/insert_task_dyn_handles.c

+ 4 - 0
tests/main/insert_task_dyn_handles.c

@@ -88,12 +88,15 @@ enodev:
         }
         }
 
 
 	starpu_shutdown();
 	starpu_shutdown();
+	free(data_handles);
+	free(descrs);
 
 
 	if (ret == -ENODEV)
 	if (ret == -ENODEV)
 	{
 	{
 		fprintf(stderr, "WARNING: No one can execute this task\n");
 		fprintf(stderr, "WARNING: No one can execute this task\n");
 		/* yes, we do not perform the computation but we did detect that no one
 		/* yes, we do not perform the computation but we did detect that no one
 		 * could perform the kernel, so this is not an error from StarPU */
 		 * could perform the kernel, so this is not an error from StarPU */
+		free(x);
 		return STARPU_TEST_SKIPPED;
 		return STARPU_TEST_SKIPPED;
 	}
 	}
 	else
 	else
@@ -118,6 +121,7 @@ enodev:
 		{
 		{
 			FPRINTF(stderr, "[end of loop] all values are correct\n");
 			FPRINTF(stderr, "[end of loop] all values are correct\n");
 		}
 		}
+		free(x);
 		return ret;
 		return ret;
 	}
 	}
 }
 }