Set ptr to zero after freeing memory
authorChris Adams <christopher.adams@nokia.com>
Fri, 27 Apr 2012 07:42:06 +0000 (17:42 +1000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 4 May 2012 00:36:27 +0000 (02:36 +0200)
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>
src/qml/qml/qqmlengine.cpp

index 7cb766b..c79e756 100644 (file)
@@ -1225,6 +1225,7 @@ void QQmlData::destroyed(QObject *object)
         }
         free(notifyList->notifies);
         free(notifyList);
+        notifyList = 0;
     }
 
     if (extendedData)