Re: [PATCH 02/16 v3] pramfs: super operations

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

 



hi Marco

> +       retval = 0;
> + out:
> +       if (retval && sbi->virt_addr) {
> +               iounmap(sbi->virt_addr);
> +               release_mem_region(sbi->phys_addr, initsize);
> +               kfree(sbi);
> +       }
> +
> +       return retval;
> +}
> +
  I think kfree(sbi) should not be put here. In case of
pram_parse_options failure, sbi should also be freed too.  How about
change it to the list below? And change some “goto out”   branches to
“goto out_free”.

 //    retval = 0;
     return 0;
 out:
       if (retval && sbi->virt_addr) {
               iounmap(sbi->virt_addr);
               release_mem_region(sbi->phys_addr, initsize);
       }
out_free:
               kfree(sbi);
       return retval;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux