From b86571ed0d67608ab972a29d44667057719167de Mon Sep 17 00:00:00 2001 From: woglinde Date: Sun, 29 May 2011 21:16:30 +0000 Subject: [PATCH] Fix:Core:set refcount to 1, if priv methods fails, otherwise the mem for map strtuct is not cleaned git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4504 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/navit/map.c | 1 + 1 file changed, 1 insertion(+) diff --git a/navit/navit/map.c b/navit/navit/map.c index 94df1e9..e13b1fa 100644 --- a/navit/navit/map.c +++ b/navit/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; } -- 2.7.4