[linux-next:master 5767/6937] fs/erofs/super.c:775:2-7: WARNING: NULL check before some freeing functions is not needed.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   7b4f2bc91c15fdcf948bb2d9741a9d7d54303f8d
commit: e4f586a41748b6edc05aca36d49b7b39e55def81 [5767/6937] erofs: reliably distinguish block based and fscache mode
config: i386-randconfig-052-20240419 (https://download.01.org/0day-ci/archive/20240419/202404190747.REAcTK1e-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)

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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404190747.REAcTK1e-lkp@xxxxxxxxx/

cocci warnings: (new ones prefixed by >>)
>> fs/erofs/super.c:775:2-7: WARNING: NULL check before some freeing functions is not needed.

vim +775 fs/erofs/super.c

   763	
   764	static void erofs_fc_free(struct fs_context *fc)
   765	{
   766		struct erofs_fs_context *ctx = fc->fs_private;
   767		struct erofs_sb_info *sbi = fc->s_fs_info;
   768	
   769		erofs_free_dev_context(ctx->devs);
   770		kfree(ctx->fsid);
   771		kfree(ctx->domain_id);
   772		kfree(ctx);
   773	
   774		if (sbi)
 > 775			kfree(sbi);
   776	}
   777	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux