apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r412246 - /apr/apr-util/trunk/dbd/apr_dbd_sqlite2.c
Date Wed, 07 Jun 2006 01:13:02 GMT
Author: bojan
Date: Tue Jun  6 18:13:01 2006
New Revision: 412246

URL: http://svn.apache.org/viewvc?rev=412246&view=rev
Log:
Don't store -1 into size_t field (a *really* big number on 64-bit machine :-)
Free allocated memory, not memory used by the pointer.

Modified:
    apr/apr-util/trunk/dbd/apr_dbd_sqlite2.c

Modified: apr/apr-util/trunk/dbd/apr_dbd_sqlite2.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/dbd/apr_dbd_sqlite2.c?rev=412246&r1=412245&r2=412246&view=diff
==============================================================================
--- apr/apr-util/trunk/dbd/apr_dbd_sqlite2.c (original)
+++ apr/apr-util/trunk/dbd/apr_dbd_sqlite2.c Tue Jun  6 18:13:01 2006
@@ -92,17 +92,12 @@
         }
 
         (*results)->res = result;
-        if (seek) {
-            (*results)->ntuples = tuples;
-        }
-        else {
-            (*results)->ntuples = -1;
-        }
+        (*results)->ntuples = tuples;
         (*results)->sz = fields;
         (*results)->random = seek;
 
         if (tuples > 0)
-            apr_pool_cleanup_register(pool, result, (void *) free,
+            apr_pool_cleanup_register(pool, *result, (void *) free,
                                       apr_pool_cleanup_null);
 
         ret = 0;



Mime
View raw message