Commit 7550d5d45cdd41bb5b8be8037e926abb3880cdc5
Fix a memory leak in filetype.c:ft_assoc_exists()
Introduced in a recent commit e40063483ee87e083cb684198a8ac590169054f1:
Keep file matchers grouped together
Previously, each matcher was registered separately to the same list
of programs/viewers. Now a single record associating matchers group
to the same list of programs/viewers is made.
Found via Coverity.
Author: xaizek
Author date (UTC): 2025-09-07 09:53
Committer name: xaizek
Committer date (UTC): 2025-09-28 13:00
Parent(s): b9167bc584cd3f25a52273f1ed5969b498ca1e39
Signing key: 99DC5E4DB05F6BE2
Tree: df59357755b236b2628d4411419168bcebccc2bd
File src/filetype.c changed (mode: 100644) (index c69b565c1..b6cfc51c6) |
... |
... |
ft_assoc_exists(const assoc_list_t *assocs, const char pattern[], |
869 |
869 |
char *mg_str = ft_mg_to_string(&assoc.mg); |
char *mg_str = ft_mg_to_string(&assoc.mg); |
870 |
870 |
if(mg_str == NULL) |
if(mg_str == NULL) |
871 |
871 |
{ |
{ |
|
872 |
|
free(undoubled); |
872 |
873 |
show_error_msg("Memory Error", "Unable to allocate enough memory"); |
show_error_msg("Memory Error", "Unable to allocate enough memory"); |
873 |
874 |
return 0; |
return 0; |
874 |
875 |
} |
} |