From 9cc306916bf8bd70e79aa67458759985e9a26c0d Mon Sep 17 00:00:00 2001 From: Chris Adams Date: Fri, 27 Apr 2012 17:42:06 +1000 Subject: [PATCH] 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 --- src/qml/qml/qqmlengine.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 7cb766b..c79e756 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) -- 1.7.2.5