Fix:vehicle_demo:Free everything on destroy
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Fri, 16 Dec 2011 22:50:32 +0000 (22:50 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Fri, 16 Dec 2011 22:50:32 +0000 (22:50 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4863 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/vehicle/demo/vehicle_demo.c

index b926452..d5551f4 100644 (file)
@@ -53,6 +53,9 @@ struct vehicle_priv {
 static void
 vehicle_demo_destroy(struct vehicle_priv *priv)
 {
+       if (priv->timer)
+               event_remove_timeout(priv->timer);
+       callback_destroy(priv->timer_callback);
        g_free(priv->timep);
        g_free(priv);
 }