summaryrefslogtreecommitdiff
path: root/navit/map.c
diff options
context:
space:
mode:
authorwoglinde <woglinde@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-05-29 21:16:30 +0000
committerwoglinde <woglinde@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-05-29 21:16:30 +0000
commita5e3ddfa231a9d76157a23b1af9c20b2a0ca0565 (patch)
tree0b98840a8e741a4b8d283f70da89e958b7eb1747 /navit/map.c
parente21fac5ba4550dd7a4af028eb098a6adcc665cf2 (diff)
downloadnavit-svn-a5e3ddfa231a9d76157a23b1af9c20b2a0ca0565.tar.gz
Fix:Core:set refcount to 1, if priv methods fails, otherwise the mem for map strtuct is not cleaned
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4504 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/map.c')
-rw-r--r--navit/map.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/navit/map.c b/navit/map.c
index 94df1e9f..e13b1fab 100644
--- a/navit/map.c
+++ b/navit/map.c
@@ -110,6 +110,7 @@ map_new(struct attr *parent, struct attr **attrs)
m->attr_cbl=callback_list_new();
m->priv=maptype_new(&m->meth, attrs, m->attr_cbl);
if (! m->priv) {
+ m->refcount = 1;
map_destroy(m);
m=NULL;
}