X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5ad9531aeffe7130cb9a83488f11b181519651d0..916a2445383d3ed94e8f17ca33e45333aea2251c:/src/xbt/dynar.c diff --git a/src/xbt/dynar.c b/src/xbt/dynar.c index 16a5f00e12..b039d3495f 100644 --- a/src/xbt/dynar.c +++ b/src/xbt/dynar.c @@ -546,10 +546,13 @@ gras_dynar_cursor_get(const gras_dynar_t * const dynar, * @dynar: * @cursor: * - * Remove the entry pointed by the cursor, for use in the middle of a foreach + * Remove (free) the entry pointed by the cursor, for use in the middle of a foreach */ void gras_dynar_cursor_rm(gras_dynar_t * dynar, int * const cursor) { - - gras_dynar_remove_at(dynar,(*cursor)--,NULL); + void *dst; + + gras_dynar_remove_at(dynar,(*cursor)--,&dst); + if (dynar->free) + (dynar->free)(dst); }