Explorar o código

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

Stasik0 %!s(int64=9) %!d(string=hai) anos
pai
achega
07095dd3bb
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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++;
     }