summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
authorom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-23 10:55:19 +0000
committerom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-23 10:55:19 +0000
commit5c8937a751101bd52b406f3d72b20cd47f001c95 (patch)
tree2e549573a214ce0d4cda2f2fcf48d8a2a9fe68f4 /src/modules/extra
parent9309ce59d33605c15ad54c1a120e87fa191f7de3 (diff)
Free, as they should be, fieldlist and/or fieldmap in destructor of PgSQLresult *if* they were allocated
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4525 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_pgsql.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp
index 7b452e7c6..ec44f2970 100644
--- a/src/modules/extra/m_pgsql.cpp
+++ b/src/modules/extra/m_pgsql.cpp
@@ -223,6 +223,13 @@ public:
~PgSQLresult()
{
+ /* If we allocated these, free them... */
+ if(fieldlist)
+ DELETE(fieldlist);
+
+ if(fieldmap)
+ DELETE(fieldmap);
+
PQclear(res);
}