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: https://git.librecmc.org/?a=commitdiff_plain;h=796ba3b9cf5aecd5ded7c64e772536cf849ffdc8;p=oweals%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 6ba0c17..72e269d 100644 --- a/service/service.c +++ b/service/service.c @@ -666,9 +666,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); } }