From: Nick Kew Date: Mon, 14 Nov 2005 15:07:00 +0000 (+0000) Subject: ver-dependent potential memory-use bug in preparing statements X-Git-Tag: 2.1.10~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1afa1638350ee7a9f02376f94da67fe2485fe75e;p=thirdparty%2Fapache%2Fhttpd.git ver-dependent potential memory-use bug in preparing statements git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@344142 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/database/mod_dbd.c b/modules/database/mod_dbd.c index ed09108e967..932ca4a931b 100644 --- a/modules/database/mod_dbd.c +++ b/modules/database/mod_dbd.c @@ -198,10 +198,11 @@ static apr_status_t dbd_prepared_init(apr_pool_t *pool, svr_cfg *svr, { 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);