Skip to content

Commit 8e24c0d

Browse files
committed
Add missing free calls to ompi_coll_base_allgather_intra_bruck
Signed-off-by: Joseph Schuchart <[email protected]>
1 parent dfc4618 commit 8e24c0d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ompi/mca/coll/base/coll_base_allgather.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,19 +178,19 @@ int ompi_coll_base_allgather_intra_bruck(const void *sbuf, int scount,
178178
/* 1. copy blocks [0 .. (size - rank - 1)] from rbuf to shift buffer */
179179
err = ompi_datatype_copy_content_same_ddt(rdtype, ((ptrdiff_t)(size - rank) * (ptrdiff_t)rcount),
180180
shift_buf, rbuf);
181-
if (err < 0) { line = __LINE__; goto err_hndl; }
181+
if (err < 0) { line = __LINE__; free(free_buf); goto err_hndl; }
182182

183183
/* 2. move blocks [(size - rank) .. size] from rbuf to the begining of rbuf */
184184
tmpsend = (char*) rbuf + (ptrdiff_t)(size - rank) * (ptrdiff_t)rcount * rext;
185185
err = ompi_datatype_copy_content_same_ddt(rdtype, (ptrdiff_t)rank * (ptrdiff_t)rcount,
186186
rbuf, tmpsend);
187-
if (err < 0) { line = __LINE__; goto err_hndl; }
187+
if (err < 0) { line = __LINE__; free(free_buf); goto err_hndl; }
188188

189189
/* 3. copy blocks from shift buffer back to rbuf starting at block [rank]. */
190190
tmprecv = (char*) rbuf + (ptrdiff_t)rank * (ptrdiff_t)rcount * rext;
191191
err = ompi_datatype_copy_content_same_ddt(rdtype, (ptrdiff_t)(size - rank) * (ptrdiff_t)rcount,
192192
tmprecv, shift_buf);
193-
if (err < 0) { line = __LINE__; goto err_hndl; }
193+
if (err < 0) { line = __LINE__; free(free_buf); goto err_hndl; }
194194

195195
free(free_buf);
196196
}

0 commit comments

Comments
 (0)