diff options
| author | Jim Meyering <meyering@redhat.com> | 2012-07-13 10:29:48 +0200 | 
|---|---|---|
| committer | Anand Avati <avati@redhat.com> | 2012-07-13 14:03:42 -0700 | 
| commit | 7820b2c1f88b207a8b1270b8c3cb3b797b7563d2 (patch) | |
| tree | 5a383d85eb18399cf7506a90cc7627c749ccf9b8 /xlators/features/locks/src/posix.c | |
| parent | 2dc0d32e5d8b205fa407073b209bb663d546dde8 (diff) | |
remove useless if-before-free (and free-like) functions
See comments in http://bugzilla.redhat.com/839925 for
the code to perform this change.
Signed-off-by: Jim Meyering <meyering@redhat.com>
BUG: 839925
Change-Id: I10e4ecff16c3749fe17c2831c516737e08a3205a
Reviewed-on: http://review.gluster.com/3661
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/features/locks/src/posix.c')
| -rw-r--r-- | xlators/features/locks/src/posix.c | 15 | 
1 files changed, 5 insertions, 10 deletions
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c index 3da40ffacac..09ce6377466 100644 --- a/xlators/features/locks/src/posix.c +++ b/xlators/features/locks/src/posix.c @@ -476,8 +476,7 @@ pl_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc,  out:          STACK_UNWIND_STRICT (getxattr, frame, op_ret, op_errno, dict, xdata); -        if (args.opts) -                GF_FREE (args.opts); +        GF_FREE (args.opts);          if (op_ret && lk_summary)                  GF_FREE (lk_summary);          if (dict) @@ -1351,8 +1350,7 @@ pl_forget (xlator_t *this,                                  list_for_each_entry_safe (entry_l, entry_tmp, &dom->entrylk_list, domain_list) {                                          list_del_init (&entry_l->domain_list); -                                        if (entry_l->basename) -                                                GF_FREE ((char *)entry_l->basename); +                                        GF_FREE ((char *)entry_l->basename);                                          GF_FREE (entry_l);                                  } @@ -1385,8 +1383,7 @@ pl_forget (xlator_t *this,          list_for_each_entry_safe (entry_l, entry_tmp, &entrylks_released, blocked_locks) {                  STACK_UNWIND_STRICT (entrylk, entry_l->frame, -1, 0, NULL); -                if (entry_l->basename) -                        GF_FREE ((char *)entry_l->basename); +                GF_FREE ((char *)entry_l->basename);                  GF_FREE (entry_l);          } @@ -2033,8 +2030,7 @@ pl_dump_inode_priv (xlator_t *this, inode_t *inode)          }  out: -        if (pathname) -                GF_FREE (pathname); +        GF_FREE (pathname);          return ret;  } @@ -2120,8 +2116,7 @@ init (xlator_t *this)  out:          if (ret) { -                if (priv) -                        GF_FREE (priv); +                GF_FREE (priv);          }          return ret;  }  | 
