Attached you would find a portion of a C program that I would need help on because of memory leak.
Function Code 25, retrieves all accounts associated to a specific social security# and save it into a memory array.
Function Code 17, retrieves a specific account's information from the memory array populated by FC25.
There are 9 child processes running, using their own memory space.
As you can see, the way the above code is written, one caller can jump between child processes and therefore cause incorrect data to be returned or the call to be transferred because of a "no dat found" error.
1. Update FC 25 and 17 to use a single memory location to store information