Commit: d79e429a9fc3c37b3a25fcde474c242d8b094bcc
Parent: 5475aba84edcafe5f7d2043262a780312ceef27a
Author: Bastien Nocera <hadess@hadess.net>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2024-07-03 17:37:30
Tree: 9d4b9e3b486ce8739088dfcc9dd4cc0559351b0f

health/mcap: Fix memory leak in mcl struct Error: RESOURCE_LEAK (CWE-772): [#def40] [important] profiles/health/mcap.c:2052:3: alloc_arg: "set_default_cb" allocates memory that is stored into "mcl->cb". profiles/health/mcap.c:2055:4: leaked_storage: Freeing "mcl" without freeing its pointer field "cb" leaks the storage that "cb" points to. 2053| if (util_getrandom(&val, sizeof(val), 0) < 0) { 2054| mcap_instance_unref(mcl->mi); 2055|-> g_free(mcl); 2056| goto drop; 2057| }

Diffstat

M profiles/health/mcap.c | 1 +

1 files changed, 1 insertions(+), 0 deletions(-)

View Full Diff | Patch