]> git.cworth.org Git - apitrace/blobdiff - gui/loaderthread.cpp
delete call after parsing it.
[apitrace] / gui / loaderthread.cpp
index bc3d32e8e9da6fe1b928610f6cbce07581cf7548..1f5474425f214d79ca1e162d34b33ccb7f653e09 100644 (file)
@@ -56,8 +56,7 @@ void LoaderThread::run()
 
     Trace::Parser p;
     if (p.open(m_fileName.toLatin1().constData())) {
-        Trace::Call *call;
-        call = p.parse_call();
+        Trace::Call *call = p.parse_call();
         while (call) {
             //std::cout << *call;
             if (!currentFrame) {
@@ -78,6 +77,7 @@ void LoaderThread::run()
                     frames.clear();
                 }
             }
+            delete call;
             call = p.parse_call();
         }
     }