Tag: 316ce2ba8e74a7bb9153b9f93adc883cb1ceb9fd

fs/ocfs2/dlm: 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