edje: fix memory leak with EDJE_TWEEN_MODE_OPT_FROM_CURRENT.
authorRyuan Choi <ryuan.choi@gmail.com>
Tue, 25 Jun 2013 01:37:59 +0000 (10:37 +0900)
committerCedric Bail <cedric.bail@samsung.com>
Tue, 25 Jun 2013 02:45:42 +0000 (11:45 +0900)
src/lib/edje/edje_program.c

index c1c6f3e..9fd3179 100644 (file)
@@ -443,6 +443,16 @@ _edje_program_end(Edje *ed, Edje_Running_Program *runp)
                                      runp->program->tween.mode, ZERO,
                                      runp->program->tween.v1,
                                      runp->program->tween.v2);
+
+                  if (rp->current)
+                    {
+                       eina_cow_free(_edje_calc_params_map_cow, rp->current->map);
+#ifdef HAVE_EPHYSICS
+                       eina_cow_free(_edje_calc_params_physics_cow, rp->current->physics);
+#endif
+                       free(rp->current);
+                       rp->current = NULL;
+                    }
                   rp->program = NULL;
                }
           }