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
Fix new/delete mismatch.
[simgrid.git]
/
examples
/
s4u
/
mc-failing-assert
/
s4u-mc-failing-assert.cpp
diff --git
a/examples/s4u/mc-failing-assert/s4u-mc-failing-assert.cpp
b/examples/s4u/mc-failing-assert/s4u-mc-failing-assert.cpp
index
3a4a8a8
..
b87e6f4
100644
(file)
--- a/
examples/s4u/mc-failing-assert/s4u-mc-failing-assert.cpp
+++ b/
examples/s4u/mc-failing-assert/s4u-mc-failing-assert.cpp
@@
-20,7
+20,7
@@
static int server(int worker_amount)
for (int count = 0; count < worker_amount; count++) {
int* msg = static_cast<int*>(mb->get());
value_got = *msg;
for (int count = 0; count < worker_amount; count++) {
int* msg = static_cast<int*>(mb->get());
value_got = *msg;
-
free(msg)
;
+
delete msg
;
}
/*
* We assert here that the last message we got (which overwrite any previously received message) is the one from the
}
/*
* We assert here that the last message we got (which overwrite any previously received message) is the one from the