diff options
| author | 2015-10-12 20:49:18 +0530 | |
|---|---|---|
| committer | 2015-10-12 16:45:21 -0700 | |
| commit | f999d0987ec1e88c455fb95e48a12a98a9fbd9a6 (patch) | |
| tree | 71109e16c1e91b6fafa1191021a553a4319d6c19 /scripts/objdiff | |
| parent | staging: lustre: lclient: NULL comparison style (diff) | |
Staging: lustre: osc: Remove null check before kfree
kfree on NULL pointer is a no-op.
The semantic patch used to find such an instance where NULL check is
present before kfree-
// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>smpl>
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions
