Adjust tests to compare against NULL, to match cases that explicitly make that comparison. Remove removal and re-addition of freeing functions. Add position variable on usb_free_urb in the non-patch case.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -16,19 +16,15 @@ virtual context · 15 unmodified lines | |||
| 16 | @r2 depends on patch@ | 16 | @r2 depends on patch@ |
| 17 | expression E; | 17 | expression E; |
| 18 | @@ | 18 | @@ |
| 19 | - if (E) | 19 | - if (E != NULL) |
| 20 | ( | 20 | ( |
| 21 | - kfree(E); | 21 | kfree(E); |
| 22 | + kfree(E); | ||
| 23 | | | 22 | | |
| 24 | - debugfs_remove(E); | 23 | debugfs_remove(E); |
| 25 | + debugfs_remove(E); | ||
| 26 | | | 24 | | |
| 27 | - debugfs_remove_recursive(E); | 25 | debugfs_remove_recursive(E); |
| 28 | + debugfs_remove_recursive(E); | ||
| 29 | | | 26 | | |
| 30 | - usb_free_urb(E); | 27 | usb_free_urb(E); |
| 31 | + usb_free_urb(E); | ||
| 32 | ) | 28 | ) |
| 33 | 29 | ||
| 34 | @r depends on context || report || org @ | 30 | @r depends on context || report || org @ |
| @@ -36,8 +32,8 @@ expression E; · 1 unmodified line | |||
| 36 | position p; | 32 | position p; |
| 37 | @@ | 33 | @@ |
| 38 | 34 | ||
| 39 | * if (E) | 35 | * if (E != NULL) |
| 40 | * \(kfree@p\|debugfs_remove@p\|debugfs_remove_recursive@p\|usb_free_urb\)(E); | 36 | * \(kfree@p\|debugfs_remove@p\|debugfs_remove_recursive@p\|usb_free_urb@p\)(E); |
| 41 | 37 | ||
| 42 | @script:python depends on org@ | 38 | @script:python depends on org@ |
| 43 | p << r.p; | 39 | p << r.p; |