object_key_iter() calls object_key_iter_typed() and then always tries to

dereference the string it returns, even if the call fails. The attached
patch fixes this. 



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2944 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
Christine Caulfield 2010-06-15 15:48:58 +00:00
parent 583eb6aea5
commit bc1cca69b3

View File

@ -1539,8 +1539,10 @@ static int object_key_iter(hdb_handle_t parent_object_handle,
char *str;
ret = object_key_iter_typed (parent_object_handle,
(char**)key_name, value, value_len, &t);
str = *key_name;
*key_len = strlen(str);
if (!ret) {
str = *key_name;
*key_len = strlen(str);
}
return ret;
}