* gpgmeplug.c (findCertificates): Reintroduced a free which must
have been removed after my last fix. This avoids a memory leak when a fingerprint was not found. Removed the double loop increment in the code to release the arrays.
This commit is contained in:
parent
0fff553077
commit
d73a0f3c41
@ -1,3 +1,10 @@
|
|||||||
|
2002-07-01 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* gpgmeplug.c (findCertificates): Reintroduced a free which must
|
||||||
|
have been removed after my last fix. This avoids a memory leak
|
||||||
|
when a fingerprint was not found. Removed the double loop
|
||||||
|
increment in the code to release the arrays.
|
||||||
|
|
||||||
2002-06-28 Werner Koch <wk@gnupg.org>
|
2002-06-28 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
* gpgmeplug.c (xmalloc): New.
|
* gpgmeplug.c (xmalloc): New.
|
||||||
|
@ -2363,6 +2363,7 @@ bool findCertificates( const char* addressee,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
free (dn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2378,7 +2379,7 @@ bool findCertificates( const char* addressee,
|
|||||||
*certificates = xmalloc( sizeof(char) * siz );
|
*certificates = xmalloc( sizeof(char) * siz );
|
||||||
memset( *certificates, 0, sizeof(char) * siz );
|
memset( *certificates, 0, sizeof(char) * siz );
|
||||||
/* fill the buffer */
|
/* fill the buffer */
|
||||||
for( iFound=0; iFound < nFound; ++iFound ) {
|
for (iFound=0; iFound < nFound; iFound++) {
|
||||||
if( !iFound )
|
if( !iFound )
|
||||||
strcpy(*certificates, DNs[iFound] );
|
strcpy(*certificates, DNs[iFound] );
|
||||||
else {
|
else {
|
||||||
@ -2388,7 +2389,6 @@ bool findCertificates( const char* addressee,
|
|||||||
strcat( *certificates, openBracket );
|
strcat( *certificates, openBracket );
|
||||||
strcat( *certificates, FPRs[iFound] );
|
strcat( *certificates, FPRs[iFound] );
|
||||||
strcat( *certificates, closeBracket );
|
strcat( *certificates, closeBracket );
|
||||||
++iFound;
|
|
||||||
free( DNs[ iFound ] );
|
free( DNs[ iFound ] );
|
||||||
free( FPRs[iFound ] );
|
free( FPRs[iFound ] );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user