From a691db15f000d301780218fbf236db7456a85e94 Mon Sep 17 00:00:00 2001 From: rideout Date: Tue, 6 May 2003 12:10:39 +0000 Subject: Free smaller boundary_widths buffers used to comply with old API. Fixes CactusBase/1502. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Boundary/trunk@224 6a38eb6e-646e-4a02-a296-d141613ad6c4 --- src/CopyBoundary.c | 8 ++++++++ src/FlatBoundary.c | 1 + src/RadiationBoundary.c | 1 + src/RobinBoundary.c | 1 + src/ScalarBoundary.c | 1 + src/StaticBoundary.c | 1 + 6 files changed, 13 insertions(+) diff --git a/src/CopyBoundary.c b/src/CopyBoundary.c index ee49deb..191b22b 100644 --- a/src/CopyBoundary.c +++ b/src/CopyBoundary.c @@ -433,6 +433,8 @@ int BndCopyVI (const cGH *GH, retval = -1; } + free(boundary_widths); + return (retval); } @@ -596,6 +598,8 @@ int BndCopyGI (const cGH *GH, retval = -1; } + free(boundary_widths); + return (retval); } @@ -763,6 +767,8 @@ int BndCopyGN (const cGH *GH, retval = -1; } + free(boundary_widths); + return (retval); } @@ -932,6 +938,8 @@ int BndCopyVN (const cGH *GH, retval = -1; } + free(boundary_widths); + return (retval); } diff --git a/src/FlatBoundary.c b/src/FlatBoundary.c index 77d24a8..84d7db9 100644 --- a/src/FlatBoundary.c +++ b/src/FlatBoundary.c @@ -1165,5 +1165,6 @@ int OldApplyBndFlat(const cGH *GH, int stencil_dir, const int *stencil_alldirs, retval = ApplyBndFlat(GH, stencil_dir, boundary_widths, dir, first_var, num_vars); + free(boundary_widths); return retval; } diff --git a/src/RadiationBoundary.c b/src/RadiationBoundary.c index 0fdfb3f..2033658 100644 --- a/src/RadiationBoundary.c +++ b/src/RadiationBoundary.c @@ -1894,5 +1894,6 @@ int OldApplyBndRadiative(const cGH *GH, retval = ApplyBndRadiative(GH, width_dir, boundary_widths, dir, var0, speed, first_var_to, first_var_from, num_vars); + free(boundary_widths); return retval; } diff --git a/src/RobinBoundary.c b/src/RobinBoundary.c index 7c8020c..0371cd8 100644 --- a/src/RobinBoundary.c +++ b/src/RobinBoundary.c @@ -1041,5 +1041,6 @@ static int OldApplyBndRobin (const cGH *GH, /* Call ApplyBnd... with new boundary width array */ retval = ApplyBndRobin(GH, boundary_widths, finf, npow, first_var, num_vars); + free(boundary_widths); return retval; } diff --git a/src/ScalarBoundary.c b/src/ScalarBoundary.c index 2418aff..36dd68a 100644 --- a/src/ScalarBoundary.c +++ b/src/ScalarBoundary.c @@ -1310,5 +1310,6 @@ static int OldApplyBndScalar(const cGH *GH, retval = ApplyBndScalar(GH, stencil_dir, boundary_widths, dir, scalar, first_var, num_vars); + free(boundary_widths); return retval; } diff --git a/src/StaticBoundary.c b/src/StaticBoundary.c index 75396f1..d7b8324 100644 --- a/src/StaticBoundary.c +++ b/src/StaticBoundary.c @@ -1152,5 +1152,6 @@ static int OldApplyBndStatic (const cGH *GH, /* Call ApplyBnd... with new boundary width array */ retval = ApplyBndStatic(GH, stencil_dir, boundary_widths, dir, first_var, num_vars); + free(boundary_widths); return retval; } -- cgit v1.2.3