Author: Julia Lawall <julia@diku.dk> After calling cpufreq_cpu_get, error handling code should call cpufreq_cpu_put. The semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r@ expression x,E; statement S; position p1,p2,p3; @@ ( if ((x = cpufreq_cpu_get@p1(…)) == NULL || …) S | x = cpufreq_cpu_get@p1(…) … when != x if (x == NULL …