Fix two WRBUF leaks (memory)
[metaproxy-moved-to-github.git] / src / filter_zoom.cpp
index 547c09f..f4e00a8 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2011 Index Data
+   Copyright (C) 2005-2012 Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
@@ -231,6 +231,7 @@ yf::Zoom::Backend::~Backend()
         xsltFreeStylesheet(xsp);
     ZOOM_connection_destroy(m_connection);
     ZOOM_resultset_destroy(m_resultset);
+    wrbuf_destroy(m_apdu_wrbuf);
 }
 
 
@@ -710,6 +711,7 @@ bool yf::Zoom::Frontend::create_content_session(mp::Package &package,
         fclose(file);
         package.log("zoom", YLOG_LOG, "content file: %s", fname);
         xfree(fname);
+        wrbuf_destroy(w);
     }
     return true;
 }