Skip to content

Commit

Permalink
Merge pull request #7959 from cniethammer/configure-leak-fix-v4.1.x
Browse files Browse the repository at this point in the history
v4.1: Fix memory leak in configure, which prevents leak sanitizer usage
  • Loading branch information
bwbarrett authored Jul 28, 2020
2 parents 36bcc48 + e0bd64f commit e08e15c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions config/c_get_alignment.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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!])
Expand Down

0 comments on commit e08e15c

Please sign in to comment.