e17: Fix memory corruption in e_remember.
authorStefan Schmidt <stefan@datenfreihafen.org>
Wed, 3 Oct 2012 08:45:40 +0000 (08:45 +0000)
committerStefan Schmidt <stefan@datenfreihafen.org>
Wed, 3 Oct 2012 08:45:40 +0000 (08:45 +0000)
Inspired by Daniels ecore mem corruption patch I fixed our coccinelle support
scripts. This one was found by bad-alloc.cocci for example.

SVN revision: 77353

src/bin/e_remember.c

index d295db0..baa799d 100644 (file)
@@ -447,7 +447,7 @@ _e_remember_update(E_Border *bd, E_Remember *rem)
    {
       E_Event_Remember_Update *ev;
 
-      ev = malloc(sizeof(ev));
+      ev = malloc(sizeof(E_Event_Remember_Update));
       if (!ev) return;
       ev->border = bd;
       ecore_event_add(E_EVENT_REMEMBER_UPDATE, ev, NULL, NULL);