It looks like you are correct. I don't see anywhere in their example code that they free the memory the allocated with malloc() except in the case where there is a failure in initialization.
My guess is that they are just leaking the memory, making the OS clean up after them.
I agree it is a bad practice. You should take ownership of your objects and manage their lifetimes properly.