Just found this mail and saw that the issue was still open. Fixed it now.

Thank you for spotting this!

Robert

----
Robert Kausch
[email protected]

Am 31.10.2014 um 19:49 schrieb Pete Batard:
Hi,

The following in memory.c [1] looks like an unfortunate typo:

  if (p_memory != NULL) return;

The result is that cdio_free() currently leaks every block of memory it should deallocate... :(

On a side note, free() is supposed to accept NULL as a pointer ([2] "If ptr is NULL, no operation is performed."), so the check for NULL could probably be avoided.

Regards,

/Pete

[1] http://git.savannah.gnu.org/gitweb/?p=libcdio.git;a=blob;f=lib/driver/memory.c#l39
[2] http://linux.die.net/man/3/free



Reply via email to