mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
Avoid double close of DBM on error.
This commit is contained in:
parent
a96cbc0f69
commit
e834a860dd
@ -101,12 +101,10 @@ apr_table_t *collection_retrieve(modsec_rec *msr, const char *col_name,
|
|||||||
if (rc != APR_SUCCESS) {
|
if (rc != APR_SUCCESS) {
|
||||||
msr_log(msr, 1, "Failed to read from DBM file \"%s\": %s", log_escape(msr->mp,
|
msr_log(msr, 1, "Failed to read from DBM file \"%s\": %s", log_escape(msr->mp,
|
||||||
dbm_filename), get_apr_error(msr->mp, rc));
|
dbm_filename), get_apr_error(msr->mp, rc));
|
||||||
apr_sdbm_close(dbm);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value->dptr == NULL) { /* Key not found in DBM file. */
|
if (value->dptr == NULL) { /* Key not found in DBM file. */
|
||||||
apr_sdbm_close(dbm);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user