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
cosmetics
[simgrid.git]
/
src
/
xbt
/
heap.c
diff --git
a/src/xbt/heap.c
b/src/xbt/heap.c
index
96da93e
..
5bfca96
100644
(file)
--- a/
src/xbt/heap.c
+++ b/
src/xbt/heap.c
@@
-53,13
+53,14
@@
inline void xbt_heap_set_update_callback(xbt_heap_t H, void (*update_callback) (
*/
void xbt_heap_free(xbt_heap_t H)
{
- int i;
+ if (!H)
+ return;
+
if (H->free)
- for (i = 0; i < H->count; i++)
+ for (i
nt i
= 0; i < H->count; i++)
H->free(H->items[i].content);
free(H->items);
free(H);
- return;
}
/**