提交 7ef88f85 编写于 作者: W Wu Zhong 提交者: Flutter GitHub Bot

Fixes leak of url in FlutterObservatoryPublisher (#14822)

上级 b98e2996
......@@ -91,7 +91,7 @@
- (void)publishServiceProtocolPort:(NSString*)uri {
// uri comes in as something like 'http://127.0.0.1:XXXXX/' where XXXXX is the port
// number.
url.reset([[[NSURL alloc] initWithString:uri] retain]);
url.reset([[NSURL alloc] initWithString:uri]);
DNSServiceFlags flags = kDNSServiceFlagsDefault;
#if TARGET_IPHONE_SIMULATOR
......@@ -157,7 +157,7 @@ static void DNSSD_API registrationCallback(DNSServiceRef sdRef,
- (void)publishServiceProtocolPort:(NSString*)uri {
// uri comes in as something like 'http://127.0.0.1:XXXXX/' where XXXXX is the port
// number.
url.reset([[[NSURL alloc] initWithString:uri] retain]);
url.reset([[NSURL alloc] initWithString:uri]);
NSNetService* netServiceTmp = [[NSNetService alloc] initWithDomain:@"local."
type:@"_dartobservatory._tcp."
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册