mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
* gpgkeys_ldap.c (search_key, main): Make sure LDAP values are freed in
case of error.
This commit is contained in:
parent
7a3e940300
commit
071966cd65
@ -1,5 +1,8 @@
|
||||
2002-10-08 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_ldap.c (search_key, main): Make sure LDAP values are
|
||||
freed in case of error.
|
||||
|
||||
* gpgkeys_ldap.c (fail_all): New function to unwind a keylist and
|
||||
error each item.
|
||||
(main): Call fail_all from here, as needed. Also add a NO_MEMORY
|
||||
|
@ -415,18 +415,20 @@ get_key(char *getkey)
|
||||
/* YYYYMMDDHHmmssZ */
|
||||
|
||||
vals=ldap_get_values(ldap,each,"pgpkeycreatetime");
|
||||
if(vals!=NULL && strlen(vals[0])==15)
|
||||
if(vals!=NULL)
|
||||
{
|
||||
fprintf(console,"Key created:\t%.2s/%.2s/%.4s\n",
|
||||
&vals[0][4],&vals[0][6],vals[0]);
|
||||
if(strlen(vals[0])==15)
|
||||
fprintf(console,"Key created:\t%.2s/%.2s/%.4s\n",
|
||||
&vals[0][4],&vals[0][6],vals[0]);
|
||||
ldap_value_free(vals);
|
||||
}
|
||||
|
||||
vals=ldap_get_values(ldap,each,"modifytimestamp");
|
||||
if(vals!=NULL && strlen(vals[0])==15)
|
||||
if(vals!=NULL)
|
||||
{
|
||||
fprintf(console,"Key modified:\t%.2s/%.2s/%.4s\n",
|
||||
&vals[0][4],&vals[0][6],vals[0]);
|
||||
if(strlen(vals[0])==15)
|
||||
fprintf(console,"Key modified:\t%.2s/%.2s/%.4s\n",
|
||||
&vals[0][4],&vals[0][6],vals[0]);
|
||||
ldap_value_free(vals);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user