[nginx] Resolver: fixed possible use-after-free in worker on fast shutdown.

Ruslan Ermilov ru at nginx.com
Thu Dec 15 19:01:15 UTC 2016


details:   http://hg.nginx.org/nginx/rev/a3dc657f4e95
branches:  
changeset: 6843:a3dc657f4e95
user:      Ruslan Ermilov <ru at nginx.com>
date:      Thu Dec 15 21:44:34 2016 +0300
description:
Resolver: fixed possible use-after-free in worker on fast shutdown.

diffstat:

 src/core/ngx_resolver.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r 25d0d6dabe00 -r a3dc657f4e95 src/core/ngx_resolver.c
--- a/src/core/ngx_resolver.c	Thu Dec 15 19:00:23 2016 +0300
+++ b/src/core/ngx_resolver.c	Thu Dec 15 21:44:34 2016 +0300
@@ -300,6 +300,10 @@ ngx_resolver_cleanup(void *data)
 #endif
 
         if (r->event) {
+            if (r->event->timer_set) {
+                ngx_del_timer(r->event);
+            }
+
             ngx_free(r->event);
         }
 


More information about the nginx-devel mailing list