[c] Difference between dangling pointer and memory leak