Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0c6d3b9

Browse files
committed
fix duplicate KVP search in function rte_attach_tag()
1 parentc08c648 commit0c6d3b9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/compat/relation_tags.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,16 @@ rte_attach_tag(const uint32 query_id,
9595
if (found)
9696
{
9797
constchar*current_key;
98+
List*existing_kvp;
9899

99100
/* Extract key of this KVP */
100101
rte_deconstruct_tag(key_value_pair,&current_key,NULL);
101102

102103
/* Check if this KVP already exists */
103-
returnrelation_tags_search(htab_entry->relation_tags,current_key);
104+
existing_kvp=relation_tags_search(htab_entry->relation_tags,
105+
current_key);
106+
if (existing_kvp)
107+
returnexisting_kvp;/* return KVP with duplicate key */
104108
}
105109

106110
/* Don't forget to initialize list! */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp