diff --git a/check_seapp/check_seapp.c b/check_seapp/check_seapp.c index 93ecb2fe17b3e6eb6fbad23aa42bb5d78a9c20dc..eab4c3553fe60d5c8ef7e49cfcd507bdb60218bb 100644 --- a/check_seapp/check_seapp.c +++ b/check_seapp/check_seapp.c @@ -428,8 +428,11 @@ static void rule_map_free(rule_map *rm, rule_map_switch s) { free(m->data); } +/* hdestroy() frees comparsion keys for non glibc */ +#ifdef __GLIBC__ if(s == rule_map_destroy_key && rm->key) free(rm->key); +#endif free(rm); } @@ -778,7 +781,10 @@ static void rule_add(rule_map *rm) { */ preserved_key = tmp->r->key; rule_map_free(tmp->r, rule_map_preserve_key); +/* hdestroy() frees comparsion keys for non glibc */ +#ifdef __GLIBC__ free(rm->key); +#endif rm->key = preserved_key; tmp->r = rm; }