diff options
Diffstat (limited to 'libglusterfs/src/graph.c')
| -rw-r--r-- | libglusterfs/src/graph.c | 11 | 
1 files changed, 4 insertions, 7 deletions
diff --git a/libglusterfs/src/graph.c b/libglusterfs/src/graph.c index 738cd9688db..db80e21272a 100644 --- a/libglusterfs/src/graph.c +++ b/libglusterfs/src/graph.c @@ -1137,13 +1137,10 @@ glusterfs_graph_attach (glusterfs_graph_t *orig_graph, char *path,          }          file_len = stbuf.st_size; -        if (file_len) { -                volfile_content = GF_CALLOC (file_len+1, sizeof (char), -                                             gf_common_mt_char); -                if (!volfile_content) { -                        return -ENOMEM; -                } -        } +        volfile_content = GF_CALLOC (file_len+1, sizeof (char), +                                     gf_common_mt_char); +        if (!volfile_content) +                return -ENOMEM;          fp = fopen (path, "r");          if (!fp) {  | 
