소스 검색

fixing a memleak in GetEndpoints service, fixes a half of #510

Stasik0 9 년 전
부모
커밋
07095dd3bb
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/server/ua_services_discovery.c

+ 1 - 0
src/server/ua_services_discovery.c

@@ -95,6 +95,7 @@ void Service_GetEndpoints(UA_Server *server, UA_Session *session, const UA_GetEn
         if(!relevant_endpoints[j])
             continue;
         retval = UA_EndpointDescription_copy(&server->endpointDescriptions[j], &response->endpoints[k]);
+        UA_String_deleteMembers(&response->endpoints[k].endpointUrl);
         retval |= UA_String_copy(&request->endpointUrl, &response->endpoints[k].endpointUrl);
         k++;
     }