Commit 4e64f671 authored by Jonas Maebe's avatar Jonas Maebe Committed by Kurt Roeckx
Browse files

rtcp_new: return failure if allocation of bi->ptr failed



Signed-off-by: default avatarKurt Roeckx <kurt@openssl.org>
Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent 1c4b688c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -157,6 +157,8 @@ static int rtcp_new(BIO *bi)
	bi->num=0;
	bi->flags = 0;
	bi->ptr=OPENSSL_malloc(sizeof(struct rpc_ctx));
	if (bi->ptr == NULL)
		return(0);
	ctx = (struct rpc_ctx *) bi->ptr;
	ctx->filled = 0;
	ctx->pos = 0;