From 558ffb5cc462b144947b7aa7e78adf062ab4f100 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Sun, 11 Jun 2017 11:49:00 +0200 Subject: [PATCH] service/service_stopped(): fix a use-after-free Found-by: Coverity Scan #1412548 Signed-off-by: Alexander Couzens --- service/service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } } -- 2.30.2