diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 12 | 
1 files changed, 11 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index e8d9b4634c2..a6f9082a801 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -40,6 +40,7 @@  #include "glusterd-sm.h"  #include "glusterd-utils.h"  #include "glusterd-store.h" +#include "glusterd-volgen.h"  #include <sys/resource.h>  #include <inttypes.h> @@ -480,6 +481,14 @@ glusterd_volinfo_new (glusterd_volinfo_t **volinfo)          INIT_LIST_HEAD (&new_volinfo->vol_list);          INIT_LIST_HEAD (&new_volinfo->bricks); +        ret = glusterd_default_xlator_options (new_volinfo); +        if (ret) { +                if (new_volinfo) +                        GF_FREE (new_volinfo); + +                goto out; +        } +          *volinfo = new_volinfo;          ret = 0; @@ -523,6 +532,8 @@ glusterd_volinfo_delete (glusterd_volinfo_t *volinfo)                          goto out;          } +        dict_unref (volinfo->dict); +          GF_FREE (volinfo);          ret = 0; @@ -632,7 +643,6 @@ out:          return ret;  } -  int32_t  glusterd_brickinfo_get (char *brick, glusterd_volinfo_t *volinfo,                          glusterd_brickinfo_t **brickinfo)  | 
