mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-01 16:33:02 +01:00
* gpgkeys_ldap.c (search_key, main): Make sure LDAP values are freed in
case of error.
This commit is contained in:
parent
338aab3be9
commit
63154fea49
@ -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 (main): Fix error return code.
|
||||
|
||||
2002-09-26 Werner Koch <wk@gnupg.org>
|
||||
|
@ -352,16 +352,18 @@ int get_key(char *getkey)
|
||||
/* YYYYMMDDHHmmssZ */
|
||||
|
||||
vals=ldap_get_values(ldap,each,"pgpkeycreatetime");
|
||||
if(vals!=NULL && strlen(vals[0])==15)
|
||||
if(vals!=NULL)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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);
|
||||
@ -886,14 +888,13 @@ int main(int argc,char *argv[])
|
||||
if(vals!=NULL)
|
||||
{
|
||||
basekeyspacedn=strdup(vals[0]);
|
||||
ldap_value_free(vals);
|
||||
if(basekeyspacedn==NULL)
|
||||
{
|
||||
fprintf(console,"gpgkeys: can't allocate string space "
|
||||
"for LDAP base\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ldap_value_free(vals);
|
||||
}
|
||||
|
||||
ldap_msgfree(res);
|
||||
|
Loading…
x
Reference in New Issue
Block a user