From 95b8c98e9149ae5cbffe9fea96c1603eb24d2757 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Thu, 12 Sep 2013 15:48:58 +0100 Subject: [PATCH] ephysics: Avoid use after free. body gets deleted here so better not access it afterwards. My guess is that in many cases the actual free gets delayed long enough to not crash here but better avoid this race in the first place. CID: 1039896 --- src/lib/ephysics/ephysics_body.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ephysics/ephysics_body.cpp b/src/lib/ephysics/ephysics_body.cpp index 791ea5075e..4235d02930 100644 --- a/src/lib/ephysics/ephysics_body.cpp +++ b/src/lib/ephysics/ephysics_body.cpp @@ -3349,8 +3349,8 @@ ephysics_orphan_body_del(EPhysics_Body *body) { _ephysics_body_event_callback_call(body, EPHYSICS_CALLBACK_BODY_DEL, (void *) body->evas_obj); - _ephysics_body_del(body); INF("Body %p deleted.", body); + _ephysics_body_del(body); } EAPI void