From: Alexander Couzens Date: Sun, 11 Jun 2017 09:49:00 +0000 (+0200) Subject: service/service_stopped(): fix a use-after-free X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=558ffb5cc462b144947b7aa7e78adf062ab4f100;p=project%2Fprocd.git service/service_stopped(): fix a use-after-free Found-by: Coverity Scan #1412548 Signed-off-by: Alexander Couzens --- diff --git a/service/service.c b/service/service.c index 9675ba2..fa7d435 100644 --- a/service/service.c +++ b/service/service.c @@ -609,9 +609,9 @@ void service_stopped(struct service *s) service_event("service.stop", s->name, NULL); avl_delete(&services, &s->avl); trigger_del(s); + service_validate_del(s); free(s->trigger); free(s); - service_validate_del(s); } }