Skip to content

Commit

Permalink
dht: add null check in gf_defrag_free_dir_dfmeta
Browse files Browse the repository at this point in the history
fixes: #1258
Change-Id: I9d1fb512072bcc540d21d47da5b15ae1b79cf2b8
Signed-off-by: Susant Palai <spalai@redhat.com>
  • Loading branch information
Susant Palai authored and mohit84 committed May 26, 2020
1 parent 61c4695 commit 66ee646
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xlators/cluster/dht/src/dht-rebalance.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
Expand Down

0 comments on commit 66ee646

Please sign in to comment.