Skip to content

Commit dcbe6ae

Browse files
Simplify PP2_SUBTYPE_AZURE_PRIVATEENDPOINT_LINKID parsing
1 parent c9e55a3 commit dcbe6ae

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/proxy_protocol.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,8 +1213,7 @@ static int32_t pp2_parse_hdr(const uint8_t *buffer, uint32_t buffer_length, pp_i
12131213
/* Connection is done through Private Link service */
12141214
if (pp2_tlv_azure->type == PP2_SUBTYPE_AZURE_PRIVATEENDPOINT_LINKID) /* 32-bit number */
12151215
{
1216-
pp2_tlv_t *tlv = tlv_new(pp2_tlv->type, pp2_tlv_len, pp2_tlv->value);
1217-
if (!tlv || !tlv_array_append_tlv(&pp_info->pp2_info.tlv_array, tlv))
1216+
if (!tlv_array_append_tlv_new(&pp_info->pp2_info.tlv_array, pp2_tlv->type, pp2_tlv_len, pp2_tlv->value))
12181217
{
12191218
return -ERR_HEAP_ALLOC;
12201219
}

0 commit comments

Comments
 (0)