mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02: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
2 changed files with 11 additions and 6 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue