tree:   git://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git master
head:   f768e5bdefe1ec9adbf7a116dfb156b73cacb582
commit: 683399eddb9fff742b1a14c5a5d03e12bfc0afff [2/3] netfilter: 
nfnetlink_acct: Adding quota support to accounting framework

net/netfilter/nfnetlink_acct.c:90 nfnl_acct_new() warn: possible memory leak of 
'nfacct'
net/netfilter/nfnetlink_acct.c:92 nfnl_acct_new() warn: possible memory leak of 
'nfacct'
net/netfilter/nfnetlink_acct.c:94 nfnl_acct_new() warn: possible memory leak of 
'nfacct'
net/netfilter/nfnetlink_acct.c:99 nfnl_acct_new() warn: overwrite may leak 
'nfacct'

git remote add ipvs-next 
git://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git
git remote update ipvs-next
git checkout 683399eddb9fff742b1a14c5a5d03e12bfc0afff
vim +/nfacct +90 net/netfilter/nfnetlink_acct.c

94139027 Pablo Neira Ayuso 2011-12-23   84      }
94139027 Pablo Neira Ayuso 2011-12-23   85  
94139027 Pablo Neira Ayuso 2011-12-23   86      nfacct = kzalloc(sizeof(struct 
nf_acct), GFP_KERNEL);
683399ed Mathieu Poirier   2014-04-20   87      if (tb[NFACCT_FLAGS]) {
683399ed Mathieu Poirier   2014-04-20   88              flags = 
ntohl(nla_get_be32(tb[NFACCT_FLAGS]));
683399ed Mathieu Poirier   2014-04-20   89              if (flags & 
~NFACCT_F_QUOTA)
683399ed Mathieu Poirier   2014-04-20  @90                      return 
-EOPNOTSUPP;
683399ed Mathieu Poirier   2014-04-20   91              if ((flags & 
NFACCT_F_QUOTA) == NFACCT_F_QUOTA)
683399ed Mathieu Poirier   2014-04-20  @92                      return -EINVAL;
683399ed Mathieu Poirier   2014-04-20   93              if (flags & 
NFACCT_F_OVERQUOTA)
683399ed Mathieu Poirier   2014-04-20  @94                      return -EINVAL;
683399ed Mathieu Poirier   2014-04-20   95  
683399ed Mathieu Poirier   2014-04-20   96              size += sizeof(u64);
683399ed Mathieu Poirier   2014-04-20   97      }
683399ed Mathieu Poirier   2014-04-20   98  
683399ed Mathieu Poirier   2014-04-20  @99      nfacct = kzalloc(sizeof(struct 
nf_acct) + size, GFP_KERNEL);
94139027 Pablo Neira Ayuso 2011-12-23  100      if (nfacct == NULL)
94139027 Pablo Neira Ayuso 2011-12-23  101              return -ENOMEM;
94139027 Pablo Neira Ayuso 2011-12-23  102  

---
0-DAY kernel build testing backend              Open Source Technology Center
http://lists.01.org/mailman/listinfo/kbuild                 Intel Corporation
_______________________________________________
kbuild mailing list
kbuild@lists.01.org
https://lists.01.org/mailman/listinfo/kbuild

Reply via email to