Re: Remove double check when field_name is not NULL in be-secure-openssl.c

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, "magnus(at)hagander(dot)net" <magnus(at)hagander(dot)net>
Subject: Re: Remove double check when field_name is not NULL in be-secure-openssl.c
Date: 2021-09-15 09:53:50
Message-ID: 73805B42-DE21-4891-8D15-7737E80337EC@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 15 Sep 2021, at 10:06, tanghy(dot)fnst(at)fujitsu(dot)com wrote:

> Attached a small fix to remove double check when field_name is not NULL in be-secure-openssl.c.
> The double check is introduced in 13cfa02f7 for "Improve error handling in backend OpenSSL implementation".

The proposal removes a second == NULL check on field_name in the case where
OBJ_nid2sn() returns an ASN1_OBJECT. This is not in a hot path, and the ASM
generated is equal under optimization levels so I don't see the value in the
code churn and the potential for collisions during backpatching around here.

--
Daniel Gustafsson https://vmware.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message tanghy.fnst@fujitsu.com 2021-09-15 10:01:20 RE: Remove double check when field_name is not NULL in be-secure-openssl.c
Previous Message Dmitry Dolgov 2021-09-15 09:40:32 Re: Physical replication from x86_64 to ARM64