You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by bo...@apache.org on 2006/06/07 03:16:01 UTC
svn commit: r412247 - /apr/apr-util/branches/1.2.x/dbd/apr_dbd_sqlite2.c
Author: bojan
Date: Tue Jun 6 18:16:01 2006
New Revision: 412247
URL: http://svn.apache.org/viewvc?rev=412247&view=rev
Log:
Merge r412246 from trunk to 1.2.x branch.
Original message:
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/branches/1.2.x/dbd/apr_dbd_sqlite2.c
Modified: apr/apr-util/branches/1.2.x/dbd/apr_dbd_sqlite2.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.2.x/dbd/apr_dbd_sqlite2.c?rev=412247&r1=412246&r2=412247&view=diff
==============================================================================
--- apr/apr-util/branches/1.2.x/dbd/apr_dbd_sqlite2.c (original)
+++ apr/apr-util/branches/1.2.x/dbd/apr_dbd_sqlite2.c Tue Jun 6 18:16: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;