Browse Source

Merge pull request #449 from thilbern/master

fix memory leak. Issue #448
bel2125 8 years ago
parent
commit
22e1ab7e89
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/civetweb.c

+ 2 - 0
src/civetweb.c

@@ -13361,6 +13361,8 @@ mg_close_connection(struct mg_connection *conn)
 		mg_free(client_ctx);
 		(void)pthread_mutex_destroy(&conn->mutex);
 		mg_free(conn);
+	} else if (conn->ctx->context_type == 0) {//Client
+		mg_free(conn);
 	}
 }