httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davi Arnaut <d...@haxent.com.br>
Subject Re: svn commit: r454683 - in /httpd/httpd/trunk: CHANGES docs/manual/mod/mod_rewrite.xml modules/mappers/mod_rewrite.c
Date Tue, 10 Oct 2006 13:03:47 GMT
Nick Kew wrote:
> On Tuesday 10 October 2006 13:00, Ruediger Pluem wrote:
>> On 10/10/2006 12:33 PM,  wrote:
>>> Author: niq
>>> Date: Tue Oct 10 03:33:06 2006
>>> New Revision: 454683
>>>
>>> URL: http://svn.apache.org/viewvc?view=rev&rev=454683
>>> Log:
>>> Add SQL Query capability to RewriteMap
>>>
>>>
>>> Modified: httpd/httpd/trunk/modules/mappers/mod_rewrite.c
>>> URL:
>>> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_rewrit
>>> e.c?view=diff&rev=454683&r1=454682&r2=454683
>>> =========================================================================
>>> ===== --- httpd/httpd/trunk/modules/mappers/mod_rewrite.c (original)
>>> +++ httpd/httpd/trunk/modules/mappers/mod_rewrite.c Tue Oct 10 03:33:06
>>> 2006
>>>
>>> +static char *lookup_map_dbd(request_rec *r, char *key, const char
>>> *label) +{
>>> +    apr_status_t rv;
>>> +    apr_dbd_prepared_t *stmt;
>>> +    apr_dbd_results_t *res = NULL;
>>> +    apr_dbd_row_t *row = NULL;
>>> +    const char *ret = NULL;
>>> +    int n = 0;
>>> +    ap_dbd_t *db = dbd_acquire(r);
>>> +
>>> +    stmt = apr_hash_get(db->prepared, label, APR_HASH_KEY_STRING);
>>> +
>>> +    rv = apr_dbd_pvselect(db->driver, r->pool, db->handle, &res,
>>> +                          stmt, 0, key, NULL);
>>> +    if (rv != 0) {
>>> +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
>>> +                      "rewritemap: error querying for %s", key);

Missing return ? res may end up NULL..

--
Davi Arnaut

Mime
View raw message