summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-handshake.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handshake.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handshake.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c
index fbc25d1c6..213bcc6fb 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handshake.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c
@@ -164,7 +164,7 @@ server_getspec (rpcsvc_request_t *req)
}
if (file_len) {
- rsp.spec = CALLOC (file_len, sizeof (char));
+ rsp.spec = CALLOC (file_len+1, sizeof (char));
if (!rsp.spec) {
ret = -1;
op_errno = ENOMEM;