summaryrefslogtreecommitdiffstats
path: root/xlators/performance
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/performance')
-rw-r--r--xlators/performance/io-cache/src/io-cache.c8
-rw-r--r--xlators/performance/md-cache/src/md-cache.c6
-rw-r--r--xlators/performance/quick-read/src/quick-read.c16
-rw-r--r--xlators/performance/read-ahead/src/read-ahead.c4
-rw-r--r--xlators/performance/symlink-cache/src/symlink-cache.c3
-rw-r--r--xlators/performance/write-behind/src/write-behind.c7
6 files changed, 12 insertions, 32 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index bdaf0f1b81a..6062f9a6863 100644
--- a/xlators/performance/io-cache/src/io-cache.c
+++ b/xlators/performance/io-cache/src/io-cache.c
@@ -1495,13 +1495,9 @@ ioc_get_priority_list (const char *opt_str, struct list_head *first)
stripe_str = strtok_r (NULL, ",", &tmp_str);
}
out:
- if (string != NULL) {
- GF_FREE (string);
- }
+ GF_FREE (string);
- if (dup_str != NULL) {
- GF_FREE (dup_str);
- }
+ GF_FREE (dup_str);
if (max_pri == -1) {
list_for_each_entry_safe (curr, tmp, first, list) {
diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c
index cf1aee9d6b9..55923990d49 100644
--- a/xlators/performance/md-cache/src/md-cache.c
+++ b/xlators/performance/md-cache/src/md-cache.c
@@ -222,8 +222,7 @@ mdc_local_wipe (xlator_t *this, mdc_local_t *local)
if (local->fd)
fd_unref (local->fd);
- if (local->linkname)
- GF_FREE (local->linkname);
+ GF_FREE (local->linkname);
if (local->xattr)
dict_unref (local->xattr);
@@ -249,8 +248,7 @@ mdc_inode_wipe (xlator_t *this, inode_t *inode)
if (mdc->xattr)
dict_unref (mdc->xattr);
- if (mdc->linkname)
- GF_FREE (mdc->linkname);
+ GF_FREE (mdc->linkname);
GF_FREE (mdc);
diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c
index 6e4ce816ec7..349ea778902 100644
--- a/xlators/performance/quick-read/src/quick-read.c
+++ b/xlators/performance/quick-read/src/quick-read.c
@@ -29,9 +29,7 @@ qr_local_free (qr_local_t *local)
call_stub_destroy (local->stub);
}
- if (local->path != NULL) {
- GF_FREE (local->path);
- }
+ GF_FREE (local->path);
mem_put (local);
@@ -1371,9 +1369,7 @@ out:
}
ret:
- if (vector) {
- GF_FREE (vector);
- }
+ GF_FREE (vector);
if (iobref) {
iobref_unref (iobref);
@@ -3754,13 +3750,9 @@ qr_get_priority_list (const char *opt_str, struct list_head *first)
priority_str = strtok_r (NULL, ",", &tmp_str);
}
out:
- if (string != NULL) {
- GF_FREE (string);
- }
+ GF_FREE (string);
- if (dup_str != NULL) {
- GF_FREE (dup_str);
- }
+ GF_FREE (dup_str);
if (max_pri == -1) {
list_for_each_entry_safe (curr, tmp, first, list) {
diff --git a/xlators/performance/read-ahead/src/read-ahead.c b/xlators/performance/read-ahead/src/read-ahead.c
index 61a07d04e96..7b23049d371 100644
--- a/xlators/performance/read-ahead/src/read-ahead.c
+++ b/xlators/performance/read-ahead/src/read-ahead.c
@@ -1071,9 +1071,7 @@ init (xlator_t *this)
out:
if (ret == -1) {
- if (conf != NULL) {
- GF_FREE (conf);
- }
+ GF_FREE (conf);
}
return ret;
diff --git a/xlators/performance/symlink-cache/src/symlink-cache.c b/xlators/performance/symlink-cache/src/symlink-cache.c
index 2e1b7a9be4e..3b5fbc252ec 100644
--- a/xlators/performance/symlink-cache/src/symlink-cache.c
+++ b/xlators/performance/symlink-cache/src/symlink-cache.c
@@ -137,8 +137,7 @@ sc_cache_set (xlator_t *this, inode_t *inode, struct iatt *buf,
err:
if (sc) {
- if (sc->readlink)
- FREE (sc->readlink);
+ FREE (sc->readlink);
sc->readlink = NULL;
FREE (sc);
}
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c
index a743039d9ab..81a254df6a0 100644
--- a/xlators/performance/write-behind/src/write-behind.c
+++ b/xlators/performance/write-behind/src/write-behind.c
@@ -577,9 +577,7 @@ out:
iobref_unref (iobref);
}
- if (vector != NULL) {
- GF_FREE (vector);
- }
+ GF_FREE (vector);
if (bytes == -1) {
/*
@@ -2963,8 +2961,7 @@ init (xlator_t *this)
out:
if (ret) {
- if (conf)
- GF_FREE (conf);
+ GF_FREE (conf);
}
return ret;
}