标签: c linux linux-kernel resources kernel-module
在内核模块中,我的代码为:
path_get(path); /*Other stuff*/ if(/*some error occurred here*/) { //path_put(path); //Does it need to call here? return -1; }
在上面的代码中,我们应该在返回错误代码之前调用 path_put()吗? path_put()?