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