mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 09:38:19 +00:00
Replace an unneeded OPENSSL_malloc call.
This commit is contained in:
parent
3905b6fc70
commit
b15bbf4f33
3 changed files with 7 additions and 5 deletions
4
CHANGES
4
CHANGES
|
@ -1,4 +1,8 @@
|
|||
|
||||
2.2-410 | 2014-05-02 12:49:53 -0500
|
||||
|
||||
* Replace an unneeded OPENSSL_malloc call. (Jon Siwek)
|
||||
|
||||
2.2-409 | 2014-05-02 12:09:06 -0500
|
||||
|
||||
* Clean up and documentation for base SNMP script. (Jon Siwek)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
2.2-409
|
||||
2.2-410
|
||||
|
|
|
@ -180,9 +180,7 @@ StringVal* file_analysis::X509::GetExtensionFromBIO(BIO* bio)
|
|||
return new StringVal("");
|
||||
}
|
||||
|
||||
// TODO: see about using regular malloc here, there were unknown problems
|
||||
// using anything other than OPENSSL_malloc that need investigation.
|
||||
char* buffer = (char*) OPENSSL_malloc(length);
|
||||
char* buffer = (char*) malloc(length);
|
||||
|
||||
if ( ! buffer )
|
||||
{
|
||||
|
@ -196,7 +194,7 @@ StringVal* file_analysis::X509::GetExtensionFromBIO(BIO* bio)
|
|||
BIO_read(bio, (void*) buffer, length);
|
||||
StringVal* ext_val = new StringVal(length, buffer);
|
||||
|
||||
OPENSSL_free(buffer);
|
||||
free(buffer);
|
||||
BIO_free_all(bio);
|
||||
|
||||
return ext_val;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue