diff options
author | Susant Palai <spalai@redhat.com> | 2020-05-22 13:47:14 +0530 |
---|---|---|
committer | MOHIT AGRAWAL <moagrawa@redhat.com> | 2020-05-26 03:04:11 +0000 |
commit | 66ee6467d9c485dabf0a32b7f282d561bd65ca8b (patch) | |
tree | 1e6e525f7189983ec4a714e85c2456df9ac4a91c /xlators | |
parent | 61c4695ea1411feeea7a802c37446bc0df45e31c (diff) | |
download | glusterfs-66ee6467d9c485dabf0a32b7f282d561bd65ca8b.tar.gz glusterfs-66ee6467d9c485dabf0a32b7f282d561bd65ca8b.tar.xz glusterfs-66ee6467d9c485dabf0a32b7f282d561bd65ca8b.zip |
dht: add null check in gf_defrag_free_dir_dfmeta
fixes: #1258
Change-Id: I9d1fb512072bcc540d21d47da5b15ae1b79cf2b8
Signed-off-by: Susant Palai <spalai@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/cluster/dht/src/dht-rebalance.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index 14377070a4..40951cb0ef 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -45,7 +45,8 @@ gf_defrag_free_dir_dfmeta(struct dir_dfmeta *meta, int local_subvols_cnt) if (meta) { for (i = 0; i < local_subvols_cnt; i++) { - gf_dirent_free(&meta->equeue[i]); + if (meta->equeue) + gf_dirent_free(&meta->equeue[i]); if (meta->lfd && meta->lfd[i]) fd_unref(meta->lfd[i]); } |