Skip to content

Commit

Permalink
initialize types after deleteMembers; clean up type handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfr committed Aug 20, 2016
1 parent 04f84eb commit 1cc0127
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 109 deletions.
4 changes: 2 additions & 2 deletions include/ua_types.h
Expand Up @@ -45,8 +45,8 @@ extern "C" {
* Copy the content of the data type. Returns ``UA_STATUSCODE_GOOD`` or
* ``UA_STATUSCODE_BADOUTOFMEMORY``.
* ``void T_deleteMembers(T *ptr)``
* Delete the dynamically allocated content of the data type, but not the data
* type itself.
* Delete the dynamically allocated content of the data type and perform a
* ``T_init`` to reset the type.
* ``void T_delete(T *ptr)``
* Delete the content of the data type and the memory for the data type itself.
*
Expand Down
2 changes: 1 addition & 1 deletion src/server/ua_server.c
Expand Up @@ -246,7 +246,7 @@ __UA_Server_addNode(UA_Server *server, const UA_NodeClass nodeClass,
if(outNewNodeId && result.statusCode == UA_STATUSCODE_GOOD)
*outNewNodeId = result.addedNodeId;
else
UA_AddNodesResult_deleteMembers(&result);
UA_NodeId_deleteMembers(&result.addedNodeId);
return result.statusCode;
}

Expand Down

0 comments on commit 1cc0127

Please sign in to comment.