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:06:11 UTC
svn commit: r344140 - /httpd/httpd/trunk/modules/database/mod_dbd.c
Author: niq
Date: Mon Nov 14 07:06:07 2005
New Revision: 344140
URL: http://svn.apache.org/viewcvs?rev=344140&view=rev
Log:
Fix driver-dependent potential memor-use bug in preparing statements
Modified:
httpd/httpd/trunk/modules/database/mod_dbd.c
Modified: httpd/httpd/trunk/modules/database/mod_dbd.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/database/mod_dbd.c?rev=344140&r1=344139&r2=344140&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/database/mod_dbd.c (original)
+++ httpd/httpd/trunk/modules/database/mod_dbd.c Mon Nov 14 07:06:07 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);