EinsteinInitialData/TwoPunctures: Allocated memory is not freed

Issue #2596 resolved
Zach Etienne created an issue

In Newton.c , lines 375-376:

  if (*normres <= tol)
    return 0;

returns from the function after temporary memory for the Newton() function has been allocated, but does not free that memory. valgrind confirms this issue.

I attach an updated version of Newton.c that should fix the issue.

Comments (9)

  1. Roland Haas

    Can you provide a diff instead of the edited file, please? The edited file makes it harder to see what was actually changed and thus review.

  2. Zach Etienne reporter

    I attach the patch. Note that 90%+ of the patch is just updated indentation to account for the update in logic needed for the fix.

  3. Log in to comment