You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ni...@apache.org on 2005/11/14 16:07:03 UTC

svn commit: r344142 - /httpd/httpd/branches/2.2.x/modules/database/mod_dbd.c

Author: niq
Date: Mon Nov 14 07:07:00 2005
New Revision: 344142

URL: http://svn.apache.org/viewcvs?rev=344142&view=rev
Log:
ver-dependent potential memory-use bug in preparing statements

Modified:
    httpd/httpd/branches/2.2.x/modules/database/mod_dbd.c

Modified: httpd/httpd/branches/2.2.x/modules/database/mod_dbd.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/database/mod_dbd.c?rev=344142&r1=344141&r2=344142&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/database/mod_dbd.c (original)
+++ httpd/httpd/branches/2.2.x/modules/database/mod_dbd.c Mon Nov 14 07:07:00 2005
@@ -198,10 +198,11 @@
 {
     dbd_prepared *p;
     apr_status_t ret = APR_SUCCESS;
-    apr_dbd_prepared_t *stmt = NULL;
+    apr_dbd_prepared_t *stmt;
     dbd->prepared = apr_hash_make(pool);
 
     for (p = svr->prepared; p; p = p->next) {
+        stmt = NULL;
         if (apr_dbd_prepare(dbd->driver, pool, dbd->handle, p->query,
                             p->label, &stmt) == 0) {
             apr_hash_set(dbd->prepared, p->label, APR_HASH_KEY_STRING, stmt);