瀏覽代碼

fix memory leak. Issue 448

THILMANT, Bernard 8 年之前
父節點
當前提交
9da783311d
共有 1 個文件被更改,包括 2 次插入0 次删除
  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);
 	}
 }