浏览代码

Fixed a SEGFAULT caused by incomplete deallocation of Variant inside dataValue.

ichrispa 10 年之前
父节点
当前提交
05ee48afa6
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/server/ua_subscription.c

+ 1 - 0
src/server/ua_subscription.c

@@ -357,6 +357,7 @@ UA_Boolean MonitoredItem_CopyMonitoredValueToVariant(UA_UInt32 AttributeID, cons
 	    if (sourceDataValue.value.data != NULL) {
 	      UA_deleteMembers(sourceDataValue.value.data, sourceDataValue.value.type);
 	      UA_free(sourceDataValue.value.data);
+              sourceDataValue.value.data = NULL;
 	    }
 	    UA_DataValue_deleteMembers(&sourceDataValue);
             samplingError = UA_FALSE;