Memory leak is a phenomenon where a running C/C++ program or a running process or thread dynamically allocates memory block from the heap but fails to free the memory block when it no more requires the memory. This happens due to programmatic error where the handle to the allocated memory block gets lost. Over a time if the same programmatic entity (a process, or a thread or a function) comes into action repeatedly and leaks memory, all the free memory of the systems goes away and eventually the systems throws the dreaded "Out Of Memory" and crumbles down.
valgrind is a popular tool which can detect memory in run-time. This blog post discusses how to install, and run valgrind at linux command line to detect memory leak in a sample C program.