memory leak: at_travelunit contains a quicklist, needs custom cleanup code.

This commit is contained in:
Enno Rehling 2015-10-13 22:09:41 +02:00
parent 7e9c36b599
commit 7c2c520911

View file

@ -38,13 +38,18 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
static void travel_done(attrib *a) {
quicklist *ql = (quicklist *)a->data.v;
ql_free(ql);
}
/*********************/ /*********************/
/* at_travelunit */ /* at_travelunit */
/*********************/ /*********************/
attrib_type at_travelunit = { attrib_type at_travelunit = {
"travelunit", "travelunit",
DEFAULT_INIT, DEFAULT_INIT,
DEFAULT_FINALIZE, travel_done,
DEFAULT_AGE, DEFAULT_AGE,
NO_WRITE, NO_WRITE,
NO_READ NO_READ