Displaying 1 result from an estimated 1 matches for "match_filter_allowlist".
2023 Apr 06
2
[Bug 3559] New: Mini memory leak and needless(?) const/static qualifier.
...conf.c and has the following prototype:
const char *kex_default_pk_alg(void);
The function looks like this:
const char *
kex_default_pk_alg(void)
{
static char *pkalgs;
if (pkalgs == NULL) {
char *all_key;
all_key = sshkey_alg_list(0, 0, 1, ',');
pkalgs = match_filter_allowlist(KEX_DEFAULT_PK_ALG, all_key);
free(all_key);
}
return pkalgs;
}
It internally buffers the result for match_filter_allowlist() in a
static variable, which makes it impossible to free the result and
essentially makes it leak.
Since the function is only called twice in the whole pro...