>> I would like to detect that a corresponding null pointer check would be 
>> missing
>> (before the data can be used for further data processing).
> * x = kmemdup(...);
>   ... when != x
> (
>   x->f
> |
>   f(...,<+...x...+>,...)
> )

This analysis approach looks promising in principle. I needed another moment
to become aware that it indicates pointer usage requirements
which can occasionally not be met (like in the mentioned function 
If the expression “x” would be split into accesses to data structure members,
the data processing can probably result in another desirable information 

The pointer usages vary in affected function implementations (as usual).

Cocci mailing list

Reply via email to