[pan2] fix use-after-free



commit ecb67b1f18dccbe53c95569bc21b80e4daa9dd50
Author: Heinrich Müller <heinrich mueller82 gmail com>
Date:   Fri May 9 20:33:17 2014 +0200

    fix use-after-free

 pan/tasks/nntp.cc        |    2 +-
 pan/tasks/task-groups.cc |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pan/tasks/nntp.cc b/pan/tasks/nntp.cc
index d34eae6..a74c469 100644
--- a/pan/tasks/nntp.cc
+++ b/pan/tasks/nntp.cc
@@ -61,8 +61,8 @@ NNTP :: fire_done_func (Health health, const StringView& response)
    {
       Listener * l = _listener;
       debug ("I (" << (void*)this << ") am setting my _listener to 0");
-      _listener = 0;
       l->on_nntp_done (this, health, response);
+      _listener = 0;
       _compression = false;
    }
 }
diff --git a/pan/tasks/task-groups.cc b/pan/tasks/task-groups.cc
index 08c1d48..c206755 100644
--- a/pan/tasks/task-groups.cc
+++ b/pan/tasks/task-groups.cc
@@ -159,7 +159,7 @@ TaskGroups :: on_nntp_done (NNTP              * nntp,
 
     if (is_gzipped)
     {
-      std::ofstream of("/home/imhotep/out");
+      std::ofstream of("tmp_out");
       of << stream.str();
       of.close();
       std::stringstream out,out2;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]