Browse Source

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

ichrispa 10 years ago
parent
commit
05ee48afa6
1 changed files with 1 additions and 0 deletions
  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;