lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdUx36N=-36v0wj8T20qgM1_SxJM_=NWUNjLVqLhj9P=SQ@mail.gmail.com>
Date: Mon, 5 Jan 2026 11:18:16 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: kernel test robot <lkp@...el.com>
Cc: Viacheslav Dubeyko <slava@...eyko.com>, oe-kbuild-all@...ts.linux.dev, 
	linux-kernel@...r.kernel.org
Subject: Re: fs/hfsplus/unicode_test.c:43:2-7: WARNING: NULL check before some
 freeing functions is not needed.

On Fri, 2 Jan 2026 at 16:18, kernel test robot <lkp@...el.com> wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   b69053dd3ffbc0d2dedbbc86182cdef6f641fe1b
> commit: 6f84ceb98538523f49d544aa7c671c87cc23d1b1 hfsplus: introduce KUnit tests for HFS+ string operations
> date:   6 weeks ago
> config: arm-randconfig-r051-20251231 (https://download.01.org/0day-ci/archive/20260102/202601022306.Dll2Dylo-lkp@intel.com/config)
> compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 86b9f90b9574b3a7d15d28a91f6316459dcfa046)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@...el.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202601022306.Dll2Dylo-lkp@intel.com/
>
> cocci warnings: (new ones prefixed by >>)
> >> fs/hfsplus/unicode_test.c:43:2-7: WARNING: NULL check before some freeing functions is not needed.
>
> vim +43 fs/hfsplus/unicode_test.c
>
>     39
>     40  static void free_mock_str_env(struct test_mock_string_env *env)
>     41  {
>     42          if (env->buf)

Perhaps the intention was to check the env pointer instead?
Note that it is (currently) always a valid pointer.

>   > 43                  kfree(env->buf);
>     44          kfree(env);
>     45  }
>     46

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ