diff options
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/dict.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libglusterfs/src/dict.c b/libglusterfs/src/dict.c index d191164f270..c58ce803f64 100644 --- a/libglusterfs/src/dict.c +++ b/libglusterfs/src/dict.c @@ -2286,8 +2286,11 @@ dict_set_bin_common (dict_t *this, char *key, void *ptr, size_t size, data->is_static = is_static; ret = dict_set (this, key, data); - if (ret < 0) + if (ret < 0) { + /* don't free data->data, let callers handle it */ + data->data = NULL; data_destroy (data); + } err: return ret; |