bug fix in server protocol segfault when the volume file key is NULL

Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
This commit is contained in:
Amar Tumballi 2009-04-29 08:51:41 -07:00 committed by Anand V. Avati
parent 78aa2ee7d2
commit ce6fa580af

View File

@ -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;