From fdef2b8643d4f00286c8761191f440a5929e8524 Mon Sep 17 00:00:00 2001 From: Hendrik Polczynski Date: Tue, 19 Mar 2013 17:42:21 +0100 Subject: [PATCH] Update mongoose.c when having connections with and without auth would cause double free and then crash --- mongoose.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mongoose.c b/mongoose.c index 2364c28a..2c17e7b7 100644 --- a/mongoose.c +++ b/mongoose.c @@ -5017,6 +5017,7 @@ static void process_new_connection(struct mg_connection *conn) { } if (ri->remote_user != NULL) { free((void *) ri->remote_user); + ri->remote_user = NULL; // when having connections with and without auth would cause double free and then crash } // NOTE(lsm): order is important here. should_keep_alive() call