Fix memory leak in configure, which prevents leak sanitizer usage
If building Open MPI with sanitizers, e.g $ configure CC=clang CFLAGS=-fsanitize=address .... configure test programs are also build with the sanitizers and will report errors resulting in configure to fail. Signed-off-by: Christoph Niethammer <niethammer@hlrs.de>
This commit is contained in:
parent
18418bfdf6
commit
e0bd64f843
@ -44,6 +44,7 @@ AC_DEFUN([OPAL_C_GET_ALIGNMENT],[
|
||||
FILE *f=fopen("conftestval", "w");
|
||||
if (!f) exit(1);
|
||||
diff = ((char *)&p->x) - ((char *)&p->c);
|
||||
free(p);
|
||||
fprintf(f, "%d\n", (diff >= 0) ? diff : -diff);
|
||||
]])], [AS_TR_SH([opal_cv_c_align_$1])=`cat conftestval`],
|
||||
[AC_MSG_WARN([*** Problem running configure test!])
|
||||
|
Loading…
Reference in New Issue
Block a user