[Liblas-commits] hg: 3 new changesets

liblas-commits at liblas.org liblas-commits at liblas.org
Tue Aug 24 23:26:35 EDT 2010


changeset 06e5a9601402 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=06e5a9601402
summary: cleanup on exit, silence a few warnings

changeset 19e3e81c5818 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=19e3e81c5818
summary: clean up srids

changeset fcc95c612f3b in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=fcc95c612f3b
summary: clean up stream after we're done getting header data

diffstat:

 apps/las2oci.cpp     |   1 +
 apps/oci_util.cpp    |   2 ++
 apps/oci_wrapper.cpp |  11 +++++++++--
 3 files changed, 12 insertions(+), 2 deletions(-)

diffs (63 lines):

diff -r 929452aa9488 -r fcc95c612f3b apps/las2oci.cpp
--- a/apps/las2oci.cpp	Tue Aug 24 21:59:58 2010 -0500
+++ b/apps/las2oci.cpp	Tue Aug 24 22:26:25 2010 -0500
@@ -615,6 +615,7 @@
     std::istream* in = OpenInput(filename, false);
     std::vector<uint8_t> data(offset);
     liblas::detail::read_n(data.front(), *in, offset);
+    delete in;
     return data;
 }
 
diff -r 929452aa9488 -r fcc95c612f3b apps/oci_util.cpp
--- a/apps/oci_util.cpp	Tue Aug 24 21:59:58 2010 -0500
+++ b/apps/oci_util.cpp	Tue Aug 24 22:26:25 2010 -0500
@@ -95,11 +95,13 @@
     if (compare_no_case(kind, "GEOGRAPHIC2D",12) == 0) {
         delete statement;
         free(kind);
+        free(p_srid);
         return true;
     }
     if (compare_no_case(kind, "GEOGRAPHIC3D",12) == 0) {
         delete statement;
         free(kind);
+        free(p_srid);
         return true;
     }
 
diff -r 929452aa9488 -r fcc95c612f3b apps/oci_wrapper.cpp
--- a/apps/oci_wrapper.cpp	Tue Aug 24 21:59:58 2010 -0500
+++ b/apps/oci_wrapper.cpp	Tue Aug 24 22:26:25 2010 -0500
@@ -252,6 +252,13 @@
 
     if( hSession )
         OCIHandleFree((dvoid *) hSession, (ub4) OCI_HTYPE_SESSION);
+    
+    if (pszUser)
+        CPLFree(pszUser);
+    if (pszPassword)
+        CPLFree(pszPassword);
+    if (pszServer)
+        CPLFree(pszServer);
 }
 
 OCIType* OWConnection::DescribeType( char *pszTypeName )
@@ -1742,7 +1749,7 @@
         }
 
         CPLError( CE_Failure, CPLE_AppDefined, "%.*s",
-            sizeof(szMsg), szMsg );
+            (ub4) sizeof(szMsg), szMsg );
         break;
 
     default:
@@ -1758,7 +1765,7 @@
                 (ub4) sizeof(szMsg), OCI_HTYPE_ERROR);
 
             CPLError( CE_Failure, CPLE_AppDefined, "%.*s",
-                sizeof(szMsg), szMsg );
+               (ub4) sizeof(szMsg), szMsg );
             break;
 
     }


More information about the Liblas-commits mailing list