summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2009-04-29 08:51:41 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-30 17:25:02 +0530
commitce6fa580af849b03c4641baf77bf07c590be934a (patch)
tree440dda1d38b9b1cf0a5c6c93a256446dc9917f9f /xlators
parent78aa2ee7d2f646a41f19858db9c48a8afc82e83f (diff)
bug fix in server protocol segfault when the volume file key is NULL
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/protocol/server/src/server-protocol.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/protocol/server/src/server-protocol.c b/xlators/protocol/server/src/server-protocol.c
index ab3b4a6b9..92cdda2bf 100644
--- a/xlators/protocol/server/src/server-protocol.c
+++ b/xlators/protocol/server/src/server-protocol.c
@@ -6641,6 +6641,10 @@ _validate_volfile_checksum (xlator_t *this, char *key,
while (temp_volfile) {
if ((NULL == key) && (NULL == temp_volfile->key))
break;
+ if ((NULL == key) || (NULL == temp_volfile->key)) {
+ temp_volfile = temp_volfile->next;
+ continue;
+ }
if (strcmp (temp_volfile->key, key) == 0)
break;
temp_volfile = temp_volfile->next;