Fix:Core:Fixed memleak identyfied by valgrind
authorwoglinde <woglinde@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Thu, 18 Mar 2010 00:05:33 +0000 (00:05 +0000)
committerwoglinde <woglinde@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Thu, 18 Mar 2010 00:05:33 +0000 (00:05 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@3035 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/vehicle.c

index 4f0af4e..5133e3b 100644 (file)
@@ -100,6 +100,7 @@ vehicle_new(struct attr *parent, struct attr **attrs)
        dbg(1, "source='%s' type='%s'\n", source->u.str, type);
 
        vehicletype_new = plugin_get_vehicle_type(type);
+       g_free(type);
        if (!vehicletype_new) {
                dbg(0, "invalid type '%s'\n", type);
                return NULL;