Tag: b3139bbc52762268769e7af842aade0e64372433

security/selinux/ss: Use kstrdup

Author: Julia Lawall <julia@diku.dk> Use kstrdup when the goal of an allocation is copy a string into the allocated region. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression from,to; expression flag,E1,E2; statement S; @@ – to = kmalloc(strlen(from) + 1,flag); + to = kstrdup(from, flag); … when != \(from …

Continue reading