Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rob Latham
MPICH-BlueGene
Commits
2df00d45
Commit
2df00d45
authored
Mar 27, 2015
by
Valentin Petrov
Committed by
Charles J Archer
Apr 27, 2015
Browse files
OFI: Fix memory leak in anysource cancel path
Signed-off-by:
Charles J Archer
<
charles.j.archer@intel.com
>
parent
ec920e5f
Changes
1
Show whitespace changes
Inline
Side-by-side
src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c
View file @
2df00d45
...
...
@@ -102,7 +102,7 @@ int MPID_nem_ofi_cancel_recv(struct MPIDI_VC *vc ATTRIBUTE((unused)), struct MPI
#define FCNAME DECL_FUNC(MPID_nem_ofi_anysource_matched)
int
MPID_nem_ofi_anysource_matched
(
MPID_Request
*
rreq
)
{
int
m
pi_errno
=
TRU
E
;
int
m
atched
=
FALS
E
;
int
ret
;
BEGIN_FUNC
(
FCNAME
);
/* ----------------------------------------------------- */
...
...
@@ -112,11 +112,23 @@ int MPID_nem_ofi_anysource_matched(MPID_Request * rreq)
/* ----------------------------------------------------- */
ret
=
fi_cancel
((
fid_t
)
gl_data
.
endpoint
,
&
(
REQ_OFI
(
rreq
)
->
ofi_context
));
if
(
ret
==
0
)
{
/* --------------------------------------------------- */
/* Request cancelled: cancel and complete the request */
/* --------------------------------------------------- */
mpi_errno
=
FALSE
;
/* Cancel succeded. This means that the actual message has been
* received via nemesis shared memory. We need to return
* matched=False. The request will be completed at the nemesis level.
*
* If anysource was posted for non-contig dtype then don't forget
* to clean up tmp space.
*/
if
(
REQ_OFI
(
rreq
)
->
pack_buffer
)
{
MPIU_Free
(
REQ_OFI
(
rreq
)
->
pack_buffer
);
}
matched
=
FALSE
;
}
else
{
/* Cancel failed. We can only fail in the case of the message
* being already actually received via ofi fabric. return TRUE.
*/
matched
=
TRUE
;
}
END_FUNC
(
FCNAME
);
return
m
pi_errno
;
return
m
atched
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment