eo: free vtable when erroring out
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Tue, 24 Mar 2020 14:48:20 +0000 (15:48 +0100)
committerJongmin Lee <jm105.lee@samsung.com>
Tue, 24 Mar 2020 21:54:58 +0000 (06:54 +0900)
if there is a error when settings API to the vtable, free the vtable
instead of leaking it.

CID 1422015

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11580

src/lib/eo/eo.c

index 060b076..3bc70da 100644 (file)
@@ -1866,6 +1866,7 @@ efl_object_override(Eo *eo_id, const Efl_Object_Ops *ops)
              else
                {
                   _vtable_free(vtable, &obj->klass->vtable);
+                  free(vtable);
                }
 
              goto err;