Skip to content

Commit

Permalink
fix: TraceContext crash issue fix for add, replace row request
Browse files Browse the repository at this point in the history
  • Loading branch information
nlrcomcast committed Apr 22, 2024
1 parent ab7c574 commit 0608768
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions source/app/libpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ static void parodus_receive()
WalPrint("Allocating memory for response headers\n");
res_headers = (headers_t *)malloc(sizeof(headers_t) + sizeof( char * ) * (wrp_msg->u.req.headers->count));
if(res_headers != NULL) {
WalInfo("Memory allocated successfully for response headers\n");
WalPrint("Memory allocated successfully for response headers\n");
memset(res_headers, 0, (sizeof(headers_t) + sizeof( char * ) * (wrp_msg->u.req.headers->count)));
}
else {
Expand All @@ -190,9 +190,7 @@ static void parodus_receive()
else {
WalPrint("Request headers field is empty so, Memory not allocated for response headers\n");
}
WalInfo("************** processRequest *****************\n");
processRequest((char *)wrp_msg->u.req.payload, wrp_msg->u.req.transaction_uuid, ((char **)(&(res_wrp_msg->u.req.payload))), wrp_msg->u.req.headers, res_headers);
WalInfo("************** processedRequest *****************\n");
if(res_headers != NULL && res_headers->headers[0] != NULL && res_headers->headers[1] != NULL) {
if(strlen(res_headers->headers[0]) > 0 && strlen(res_headers->headers[1]) > 0) {
res_headers->count = wrp_msg->u.req.headers->count;
Expand All @@ -210,7 +208,6 @@ static void parodus_receive()
WalInfo("Deallocating memory for response headers");
free(res_headers);
res_headers = NULL;
WalInfo("Deallocated memory for response headers");
}

if(res_wrp_msg->u.req.payload !=NULL)
Expand Down Expand Up @@ -250,7 +247,6 @@ static void parodus_receive()
getCurrentTime(endPtr);
WalInfo("Elapsed time : %ld ms\n", timeValDiff(startPtr, endPtr));
wrp_free_struct (res_wrp_msg);
WalInfo("Deallocated memory for res_wrp_msg");
}
wrp_free_struct (wrp_msg);
}
Expand Down

0 comments on commit 0608768

Please sign in to comment.