From 96927e7d0c331156de131eca031414bdf52da1b5 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Sun, 8 Apr 2018 14:08:06 +0300 Subject: Controller: fixed a memory leak when PUT operation failed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks to 洪志道 (Hong Zhi Dao). --- src/nxt_controller.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/nxt_controller.c') diff --git a/src/nxt_controller.c b/src/nxt_controller.c index d89c8dbc..d1d8efbf 100644 --- a/src/nxt_controller.c +++ b/src/nxt_controller.c @@ -835,6 +835,8 @@ nxt_controller_process_request(nxt_task_t *task, nxt_controller_request_t *req) &path, value); if (rc != NXT_OK) { + nxt_mp_destroy(mp); + if (rc == NXT_DECLINED) { goto not_found; } -- cgit