remzi-arpacidusseau / ostep-typos

50 stars 44 forks source link

Chapter 30: (Page-15, Figure 30.15): Memory leak in the free() code #101

Open nitinpuranik opened 4 months ago

nitinpuranik commented 4 months ago

First of all, this book is a treasure! Thank you so much for this wonderful gift to the world :)

I'm reporting a minor oversight in the void free() function in the below part of the book: Chapter 30: Condition Variables Page 15 Figure 30.15

The function body doesn't have a line (pseudocode, at least) to return back the allocated memory to heap, leading to a memory leak.