mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-05 01:06:04 +00:00
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:
parent
583eb6aea5
commit
bc1cca69b3
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user