summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/storage/bd/src/bd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/storage/bd/src/bd.c b/xlators/storage/bd/src/bd.c
index 456883d9358..6ea18e7787b 100644
--- a/xlators/storage/bd/src/bd.c
+++ b/xlators/storage/bd/src/bd.c
@@ -1592,7 +1592,8 @@ revert_xattr:
/* revert setxattr */
op_ret = dict_get_str (local->dict, BD_XATTR, &bd);
GF_FREE (bd);
- gf_asprintf (&bd, "%s:%ld", bdatt->type, bdatt->iatt.ia_size);
+ if (bdatt)
+ gf_asprintf (&bd, "%s:%ld", bdatt->type, bdatt->iatt.ia_size);
if (local->fd)
STACK_WIND (frame, bd_trunc_setxattr_setx_cbk,