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
model-checker : privatization_regions in snapshot may be NULL
[simgrid.git]
/
src
/
mc
/
mc_checkpoint.c
diff --git
a/src/mc/mc_checkpoint.c
b/src/mc/mc_checkpoint.c
index
92d7616
..
e455677
100644
(file)
--- a/
src/mc/mc_checkpoint.c
+++ b/
src/mc/mc_checkpoint.c
@@
-67,11
+67,13
@@
void MC_free_snapshot(mc_snapshot_t snapshot){
xbt_dynar_free(&(snapshot->stacks));
xbt_dynar_free(&(snapshot->to_ignore));
xbt_dynar_free(&(snapshot->stacks));
xbt_dynar_free(&(snapshot->to_ignore));
- size_t n = snapshot->nb_processes;
- for(i=0; i!=n; ++i) {
- MC_region_destroy(snapshot->privatization_regions[i]);
+ if(snapshot->privatization_regions){
+ size_t n = snapshot->nb_processes;
+ for(i=0; i!=n; ++i) {
+ MC_region_destroy(snapshot->privatization_regions[i]);
+ }
+ xbt_free(snapshot->privatization_regions);
}
}
- xbt_free(snapshot->privatization_regions);
xbt_free(snapshot);
}
xbt_free(snapshot);
}