A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
get out before dereferencing null pointer in this case
[simgrid.git]
/
src
/
smpi
/
mpi
/
smpi_comm.cpp
diff --git
a/src/smpi/mpi/smpi_comm.cpp
b/src/smpi/mpi/smpi_comm.cpp
index
6baa559
..
5bdf88d
100644
(file)
--- a/
src/smpi/mpi/smpi_comm.cpp
+++ b/
src/smpi/mpi/smpi_comm.cpp
@@
-98,6
+98,8
@@
int Comm::dup(MPI_Comm* newcomm){
int Comm::dup_with_info(MPI_Info info, MPI_Comm* newcomm){
int ret = dup(newcomm);
+ if(ret != MPI_SUCCESS)
+ return ret;
if((*newcomm)->info_!=MPI_INFO_NULL){
simgrid::smpi::Info::unref((*newcomm)->info_);
(*newcomm)->info_=MPI_INFO_NULL;