[lkml]   [2019]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Coccinelle: Checking the deletion of duplicate of_node_put() calls with SmPL
> 110:	ierr_out:

> 111: of_node_put(trng); ---> double released here

> ...

> This issue was detected by using the Coccinelle software.

Such a detection of a questionable source code place can be nice and helpful.

I constructed another script variant for the semantic patch language.

expression x;
identifier target;
if (...)
goto target;
... when any

I observe then that this adjustment approach can generate the desired patch
for a source code extract.

elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch ../janitor/delete_duplicate_of_node_put1.cocci crypto4xx_trng-excerpt1.c

- of_node_put(trng);

But I wonder at the moment why it does not work (as expected) for the original
complete source file.

I am curious on further software development ideas.


 \ /
  Last update: 2019-07-09 14:17    [W:0.107 / U:13.768 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site