From ce6fa580af849b03c4641baf77bf07c590be934a Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 29 Apr 2009 08:51:41 -0700 Subject: bug fix in server protocol segfault when the volume file key is NULL Signed-off-by: Anand V. Avati --- xlators/protocol/server/src/server-protocol.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xlators') diff --git a/xlators/protocol/server/src/server-protocol.c b/xlators/protocol/server/src/server-protocol.c index ab3b4a6b915..92cdda2bf84 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; -- cgit