|
@@ -783,12 +783,13 @@ writeArrayDimensionsAttribute(UA_Server *server, UA_Session *session,
|
|
|
|
|
|
/* Ok, apply */
|
|
|
UA_UInt32 *oldArrayDimensions = node->arrayDimensions;
|
|
|
+ size_t oldArrayDimensionsSize = node->arrayDimensionsSize;
|
|
|
retval = UA_Array_copy(arrayDimensions, arrayDimensionsSize,
|
|
|
(void**)&node->arrayDimensions,
|
|
|
&UA_TYPES[UA_TYPES_UINT32]);
|
|
|
if(retval != UA_STATUSCODE_GOOD)
|
|
|
return retval;
|
|
|
- UA_free(oldArrayDimensions);
|
|
|
+ UA_Array_delete(oldArrayDimensions, oldArrayDimensionsSize, &UA_TYPES[UA_TYPES_UINT32]);
|
|
|
node->arrayDimensionsSize = arrayDimensionsSize;
|
|
|
return UA_STATUSCODE_GOOD;
|
|
|
}
|