Re: [PATCH] certificate_db/ssl_crtd fixes

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 08 Nov 2012 17:06:56 +1300

On 8/11/2012 6:25 a.m., Tsantilas Christos wrote:
> certificate_db/ssl_crtd fixes
>
> - Try to update the index file in all cases the database modified
>
> - The find operator in database should not modify the database.
> Currently if an entry is expired, ssl_crtd removes the cert file but
> does not update the index file.
>
> - Use OPENSSL_malloc and OPENSSL_free to allocate/release memory for
> TXT_DB rows. Currently we are using the new operator.
>
> - Fix a small memory leak when remove entries from database: A row
> object removed from TXT_DB indexes but never released. This patch:
>
> * Use OPENSSL_malloc and OPENSSL_free to allocate/release memory
> for TXT_DB rows. OpenSSL SDK assumes that always allocated using these
> functions.
>
> * Add code in Ssl::CertificateDb::Row destructor to correctly
> release a TXT_DB row. The code take cares for rows allocated internally
> by OpenSSL SDK.
>
> * Add the sq_TXT_DB_delete and sq_TXT_DB_delete_row functions which
> removes a row from TXT_DB indexes.
>
>
> The patch applies as is to squid-3.3. A patch for squid-3.2 is included
>
>
> This is a Measurement Factory project

  Ssl::CertificateDb::Row::~Row():
  * OPENSSL_free(row) being used in both if and else condition can be
moved after the if-else construct.

That is all that stands out at me. Good job this. Thank you.

+1.

Amos
Received on Thu Nov 08 2012 - 04:07:12 MST

This archive was generated by hypermail 2.2.0 : Fri Nov 09 2012 - 12:00:05 MST