Skip to content

Commit e02b4a1

Browse files
Mladen TurkFelipe Zimmerle
authored andcommitted
Do not duplicate already duplicated string
1 parent 931d75c commit e02b4a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modsec-sdbm-util.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,13 +356,13 @@ static int dump_database(apr_pool_t *pool, apr_sdbm_t *db, int action, char *new
356356
return fret;
357357
}
358358

359-
int remove_key (apr_pool_t *pool, apr_sdbm_t *db, const char *key_str)
359+
int remove_key (apr_pool_t *pool, apr_sdbm_t *db, char *key_str)
360360
{
361361
apr_sdbm_datum_t key;
362362

363363
v("Deleting key: %s\n", key_str);
364364

365-
key.dptr = (char *)strdup(key_str);
365+
key.dptr = key_str;
366366
key.dsize = strlen(key_str)+1;
367367

368368
return remove_datum_t(pool, db, &key);

0 commit comments

Comments
 (0)