edje_entry: Fix mem leak and get rid of useless calloc here.
authorStefan Schmidt <stefan@datenfreihafen.org>
Tue, 2 Oct 2012 12:53:54 +0000 (12:53 +0000)
committerStefan Schmidt <stefan@datenfreihafen.org>
Tue, 2 Oct 2012 12:53:54 +0000 (12:53 +0000)
We could leak here if the next condition is true. And more important we calloc
in just 6 lines below again. From the log it seems this was just not catched
in a rewrite of this part of the code.

SVN revision: 77319

legacy/edje/src/lib/edje_entry.c

index ae2c217..d5530ab 100644 (file)
@@ -2792,8 +2792,8 @@ void
 _edje_entry_user_insert(Edje_Real_Part *rp, const char *text)
 {
    Entry *en;
-   Edje_Entry_Change_Info *info = calloc(1, sizeof(*info));
-   
+   Edje_Entry_Change_Info *info;
+
    if ((rp->type != EDJE_RP_TYPE_TEXT) ||
        (!rp->typedata.text)) return;
    en = rp->typedata.text->entry_data;