libxml++ r185 - in trunk: . libxml++/validators



Author: murrayc
Date: Mon Dec  8 18:04:17 2008
New Revision: 185
URL: http://svn.gnome.org/viewvc/libxml++?rev=185&view=rev

Log:
2008-12-08  Murray Cumming  <murrayc murrayc com>

* libxml++/validators/validator.cc: check_for_exception(): Use an 
auto_ptr<> to avoid leaking the exception, as in 
Parser::check_for_exception().
Bug #563321 (Arjan Franzen)

Modified:
   trunk/ChangeLog
   trunk/libxml++/validators/validator.cc

Modified: trunk/libxml++/validators/validator.cc
==============================================================================
--- trunk/libxml++/validators/validator.cc	(original)
+++ trunk/libxml++/validators/validator.cc	Mon Dec  8 18:04:17 2008
@@ -10,6 +10,7 @@
 #include <libxml/parser.h>
 
 #include <cstdarg> //For va_list.
+#include <memory> //For auto_ptr.
 
 namespace xmlpp {
 
@@ -151,7 +152,7 @@
 
   if(exception_)
   {
-    exception* tmp = exception_;
+    std::auto_ptr<exception> tmp(exception_);
     exception_ = 0;
     tmp->Raise();
   }



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