C language encountered a problem of structure assignment failure in use?

  c++, question

I have a Class A:
Defines a structure

typedef struct
 {
 int sockfd;
 on_av_frame_cb av_frame_cb;
 on_av_frame_cb rtp_cb;
 on_error_cb error_cb;
 uint8_t *p_buf;
 uint8_t *v_buf;
 uint8_t *a_buf;
 int  rtp_flag;
 
 }udp_client_t;

Then I call in class b:

static udp_client_t client;
 int jldv_create_client(int src_port,int port ,const char *dst_ip){
 
 
 udp_client_t *udpClient = &client;
 
 assert(udpClient !  = NULL);
 const char *c_ip = dst_ip;
 
 memset(udpClient, 0, sizeof(udp_client_t));
 
 int ret = create_client(src_port, port, c_ip, &udpClient);
 
 if (ret !  = 0) {
 
 goto err_output;
 }
 
 udpClient->av_frame_cb = (on_av_frame_cb )onVideoFrame;
 udpClient->error_cb = on_error;
 
 
 
 If (RTP _ create (& udpclient) < 0) {///where is the problem
 goto err_output;
 }
 
 printf("rtp_client:%d \n",udpClient->rtp_flag);
 return 0;
 
 err_output:
 destroy_client(udpClient);
 return -1;
 
 }

In the place where the above problem lies, I used the method of Class C:

int rtp_create(udp_client_t **data)
 {
 logi("%s", __func__);
 
 udp_client_t *udpClient = *data;
 if(udpClient)
 {
 
 udpClient->rtp_flag = 1;
 
 
 memset(&rtp_cxt, 0, sizeof(rtp_context_t));
 int ret = init_server();
 if (ret < 0)
 {
 return -1;
 }
 rtp_cxt.nalu = alloc_nalu(MAX_FRAME_SIZE);  //allocate space for structure nalu_t and its member buf.  The return value is a pointer to nalu_t storage space
 if (!  rtp_cxt.nalu)
 {
 loge("alloc nalu failed");
 return -2;
 }
 }
 else
 {
 loge("%s: data is null", __func__);
 return -3;
 }
 
 printf("udpClient after==>%d \n",udpClient->rtp_flag);
 return 0;
 }

However, the result of printing is:

udpClient after==>1
 rtp_client:0

Why is this?
Did I use it incorrectly? To solve the great gods. .

Logic is entirely possible to go like this:

udp_client_t *udpClient = *data;
 if (udpClient)
 {
 udpClient->rtp_flag = 1;
 int ret = init_server();
 if (ret < 0)
 {
 //Not implemented here
 }
 rtp_cxt.nalu = alloc_nalu(MAX_FRAME_SIZE);
 if (!  rtp_cxt.nalu)
 {
 //Not implemented here
 }
 }
 else
 {
 //Not implemented here
 }
 //at this time udpClient->rtp_flag => 1 and return value is 0
 return 0;

Is there a problem with outputs 1 and 0?