Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F19741702
D475.id1356.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
1 KB
Subscribers
None
D475.id1356.diff
View Options
diff --git a/dirmngr/ks-engine-ldap.c b/dirmngr/ks-engine-ldap.c
--- a/dirmngr/ks-engine-ldap.c
+++ b/dirmngr/ks-engine-ldap.c
@@ -1530,42 +1530,22 @@
xfree (modlist);
}
-/* Append two onto the end of one. Two is not freed, but its pointers
- are now part of one. Make sure you don't free them both!
-
- As long as you don't add anything to ONE, TWO is still valid.
- After that all bets are off. */
+/* Append two onto the end of one. Two remains unchanged, and must be
+ freed as usual. */
static void
modlists_join (LDAPMod ***one, LDAPMod **two)
{
- int i, one_count = 0, two_count = 0;
- LDAPMod **grow;
+ int i;
if (!*two)
/* two is empty. Nothing to do. */
return;
- if (!*one)
- /* one is empty. Just set it equal to *two. */
+ for (; *two; two++)
{
- *one = two;
- return;
+ for (i = 0; (*two)->mod_values[i]; i++)
+ modlist_add (one, (*two)->mod_type, (*two)->mod_values[i]);
}
-
- for (grow = *one; *grow; grow++)
- one_count ++;
-
- for (grow = two; *grow; grow++)
- two_count ++;
-
- grow = xrealloc (*one, sizeof(LDAPMod *) * (one_count + two_count + 1));
-
- for (i = 0; i < two_count; i++)
- grow[one_count + i] = two[i];
-
- grow[one_count + i] = NULL;
-
- *one = grow;
}
/* Given a string, unescape C escapes. In particular, \xXX. This
@@ -1993,7 +1973,7 @@
*newline = '\0';
- extract_attributes (&modlist, info);
+ extract_attributes (&addlist, info);
infolen = infolen - ((uintptr_t) newline - (uintptr_t) info + 1);
info = newline + 1;
@@ -2078,7 +2058,7 @@
xfree (pgpkeyattr);
modlist_free (modlist);
- xfree (addlist);
+ modlist_free (addlist);
xfree (data_armored);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 31, 9:06 AM (1 h, 48 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
4c/9b/744a33f94b7976b0c977b0669dc2
Attached To
D475: Fix addition of new GPG keys to LDAP
Event Timeline
Log In to Comment