1. 01 10月, 2009 1 次提交
  2. 29 9月, 2009 1 次提交
  3. 23 9月, 2009 1 次提交
  4. 03 8月, 2009 1 次提交
  5. 28 7月, 2009 1 次提交
  6. 08 5月, 2009 1 次提交
  7. 30 4月, 2009 1 次提交
  8. 14 4月, 2009 1 次提交
  9. 07 4月, 2009 1 次提交
  10. 25 3月, 2009 2 次提交
  11. 22 3月, 2009 1 次提交
  12. 17 3月, 2009 3 次提交
  13. 19 2月, 2009 2 次提交
  14. 11 2月, 2009 1 次提交
  15. 09 2月, 2009 1 次提交
    • J
      drivers/atm: introduce missing kfree · bc111d57
      Julia Lawall 提交于
      Error handling code following a kmalloc should free the allocated data.
      
      The semantic match that finds the problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r exists@
      local idexpression x;
      statement S;
      expression E;
      identifier f,l;
      position p1,p2;
      expression *ptr != NULL;
      @@
      
      (
      if ((x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...)) == NULL) S
      |
      x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
      ...
      if (x == NULL) S
      )
      <... when != x
           when != if (...) { <+...x...+> }
      x->f = E
      ...>
      (
       return \(0\|<+...x...+>\|ptr\);
      |
       return@p2 ...;
      )
      
      @script:python@
      p1 << r.p1;
      p2 << r.p2;
      @@
      
      print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bc111d57
  16. 30 1月, 2009 5 次提交
  17. 29 1月, 2009 8 次提交
  18. 28 1月, 2009 4 次提交
  19. 27 1月, 2009 4 次提交
新手
引导
客服 返回
顶部