Skip to content

Commit

Permalink
Merge pull request #266 from nlrcomcast/6.7_p2b
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 22, 2024
2 parents 6c33cbf + 8e021aa commit 8d62747
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion source/app/libpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,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 @@ -203,6 +203,12 @@ 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)
{
Expand Down

0 comments on commit 8d62747

Please sign in to comment.