Skip to content

Commit

Permalink
Merge pull request #264 from nlrcomcast/CMXB7-6054
Browse files Browse the repository at this point in the history
fix: TraceContext crash issue fix for add, replace row request
  • Loading branch information
sadhyama authored Apr 17, 2024
2 parents 161476f + 0046747 commit e47af97
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions source/app/libpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static void parodus_receive()
res_headers = (headers_t *)malloc(sizeof(headers_t) + sizeof( char * ) * (wrp_msg->u.req.headers->count));
if(res_headers != NULL) {
WalPrint("Memory allocated successfully for response headers\n");
memset(res_headers, 0, sizeof(headers_t));
memset(res_headers, 0, (sizeof(headers_t) + sizeof( char * ) * (wrp_msg->u.req.headers->count)));
}
else {
WalError("Memory not allocated for response headers\n");
Expand All @@ -208,7 +208,13 @@ static void parodus_receive()
}
}
}

else if(res_headers != NULL)
{
WalInfo("Deallocating memory for non processing response headers\n");
free(res_headers);
res_headers = NULL;
}

if(res_wrp_msg->u.req.payload !=NULL)
{
WalPrint("Response payload is %s\n",(char *)(res_wrp_msg->u.req.payload));
Expand Down

0 comments on commit e47af97

Please sign in to comment.