Skip to content

Commit 2ce3c1d

Browse files
committed
check return code
1 parent e55172e commit 2ce3c1d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/protocols/der/decode.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,10 @@ static ssize_t fr_der_decode_oid_to_str(uint64_t subidentifier, void *uctx, bool
589589
vp = fr_pair_afrom_da(decode_ctx->ctx, decode_ctx->parent_da);
590590
if (unlikely(!vp)) goto oom;
591591

592-
fr_pair_value_bstrndup(vp, decode_ctx->oid_buff, fr_sbuff_used(&sb), false);
592+
if (fr_pair_value_bstrndup(vp, decode_ctx->oid_buff, fr_sbuff_used(&sb), false) < 0) {
593+
talloc_free(vp);
594+
goto oom;
595+
}
593596

594597
fr_pair_append(decode_ctx->parent_list, vp);
595598

0 commit comments

Comments
 (0)