Browse Source

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

Stasik0 9 years ago
parent
commit
07095dd3bb
1 changed files with 1 additions and 0 deletions
  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++;
     }