Skip to content

Commit

Permalink
fixup! WIP: Suppress some leak checks by clang-analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasdemarchi committed Nov 8, 2024
1 parent b417f8d commit 709fd1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libkmod/libkmod-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,13 @@ static void kmod_config_free_alias(struct kmod_config *config, struct kmod_list

static int kmod_config_add_blacklist(struct kmod_config *config, const char *modname)
{
_cleanup_free_ char *p = strdup(modname);
_cleanup_free_ char *p;
struct kmod_list *list;

DBG(config->ctx, "modname=%s\n", modname);

[[clang::suppress]]
p = strdup(modname);
if (!p)
return -ENOMEM;

Expand Down
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ add_project_arguments(
'-Wmissing-prototypes',
'-Wnested-externs',
'-Wno-unused-parameter',
'-Wno-attributes=clang::suppress',
'-Wold-style-definition',
'-Wpointer-arith',
'-Wredundant-decls',
Expand Down

0 comments on commit 709fd1f

Please sign in to comment.