aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Adams <christopher.adams@nokia.com>2012-04-27 17:42:06 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-04 02:36:27 +0200
commit9cc306916bf8bd70e79aa67458759985e9a26c0d (patch)
tree7dfd5daa744ba802c112add82b99e95cf4655a4c
parenteea254fea5c02fce1fed568604a87395c9049835 (diff)
Set ptr to zero after freeing memory
This commit ensures that we set the notifyList to zero after freeing it, to avoid possibility of dereferencing freed memory. Change-Id: I0ce90507ad209748642a218608e118e5034bfabd Reviewed-by: Martin Jones <martin.jones@nokia.com>
-rw-r--r--src/qml/qml/qqmlengine.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 7cb766b17c..c79e756147 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -1225,6 +1225,7 @@ void QQmlData::destroyed(QObject *object)
}
free(notifyList->notifies);
free(notifyList);
+ notifyList = 0;
}
if (extendedData)