Question: (IN C) Could someone please help fix my memory leaks? I'm working on a project and the last test case I'm failing is one that

(IN C) Could someone please help fix my memory leaks? I'm working on a project and the last test case I'm failing is one that tests for leaks, below is what the autograder error displays:

==64== Conditional jump or move depends on uninitialised value(s) ==64== at 0x109C4D: getListStats (functions.c:180) ==64== by 0x1093A2: main (driver.c:30) ==64== ==64== Conditional jump or move depends on uninitialised value(s) ==64== at 0x109C86: getListStats (functions.c:183) ==64== by 0x1093A2: main (driver.c:30) ==64== ==64== Conditional jump or move depends on uninitialised value(s) ==64== at 0x109CD5: getListStats (functions.c:177) ==64== by 0x1093A2: main (driver.c:30) ==64== ==64== Conditional jump or move depends on uninitialised value(s) ==64== at 0x10972D: deleteList (functions.c:85) ==64== by 0x1093C1: main (driver.c:34) ==64== ==64== ==64== HEAP SUMMARY: ==64== in use at exit: 944 bytes in 2 blocks ==64== total heap usage: 32 allocs, 30 frees, 16,752 bytes allocated ==64== ==64== LEAK SUMMARY: ==64== definitely lost: 0 bytes in 0 blocks ==64== indirectly lost: 0 bytes in 0 blocks ==64== possibly lost: 0 bytes in 0 blocks ==64== still reachable: 944 bytes in 2 blocks ==64== suppressed: 0 bytes in 0 blocks ==64== Reachable blocks (those to which a pointer was found) are not shown. ==64== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==64== ==64== Use --track-origins=yes to see where uninitialised values come from ==64== For lists of detected and suppressed errors, rerun with: -s ==64== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)

Below is my code

driver.c

(IN C) Could someone please help fix my memory leaks? I'm working

functions.h

on a project and the last test case I'm failing is onethat tests for leaks, below is what the autograder error displays: ==64==

functions.c

Conditional jump or move depends on uninitialised value(s) ==64== at 0x109C4D: getListStats(functions.c:180) ==64== by 0x1093A2: main (driver.c:30) ==64== ==64== Conditional jump or movedepends on uninitialised value(s) ==64== at 0x109C86: getListStats (functions.c:183) ==64== by 0x1093A2:main (driver.c:30) ==64== ==64== Conditional jump or move depends on uninitialised value(s)==64== at 0x109CD5: getListStats (functions.c:177) ==64== by 0x1093A2: main (driver.c:30) ==64== ==64==Conditional jump or move depends on uninitialised value(s) ==64== at 0x10972D: deleteList(functions.c:85) ==64== by 0x1093C1: main (driver.c:34) ==64== ==64== ==64== HEAP SUMMARY: ==64==in use at exit: 944 bytes in 2 blocks ==64== total heapusage: 32 allocs, 30 frees, 16,752 bytes allocated ==64== ==64== LEAK SUMMARY:

Any comments or bold text to show exactly where the fixes are would be greatly appreciated, Thanks!!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!