From: YoungHun Kim Date: Thu, 5 Sep 2019 06:36:49 +0000 (+0900) Subject: Fix the crash issue of check_destroy X-Git-Tag: submit/tizen_4.0/20190905.081408^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8e30055a7da6bd3a355adcbb28f9b8c9bb4816ea;p=platform%2Fupstream%2Fmurphy.git Fix the crash issue of check_destroy - If check_destory is called after mrp_transport_destroy, then there double free issue. check_destroy is verifying if destroyed with purge_destroyed. So we can return simply using destoyed variable. Change-Id: I92dc725df47a76a9e7020ef67657b02043ede434 --- diff --git a/src/common/transport.c b/src/common/transport.c index d00c588..50a7263 100644 --- a/src/common/transport.c +++ b/src/common/transport.c @@ -383,7 +383,10 @@ void mrp_transport_destroy(mrp_transport_t *t) static int check_destroy(mrp_transport_t *t) { - return purge_destroyed(t); + if (t->destroyed && !t->busy) + return TRUE; + + return FALSE; }