From 9b47893aa8736d173ca85a30c5336d9418b3044f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 31 Jul 2016 21:39:53 +0300 Subject: Fix memory leak on exit/item_db reload after adding vectors in item_db. --- src/emap/itemdb.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/emap') diff --git a/src/emap/itemdb.c b/src/emap/itemdb.c index 63daca0..4c33853 100644 --- a/src/emap/itemdb.c +++ b/src/emap/itemdb.c @@ -201,4 +201,6 @@ void edestroy_item_data_pre(struct item_data **selfPtr, script->free_code(data->takeScript); if (data->insertScript) script->free_code(data->insertScript); + VECTOR_CLEAR(data->allowedCards); + VECTOR_CLEAR(data->allowedAmmo); } -- cgit v1.2.3-70-g09d2