Example of a double-free vulnerability in C

I hope it is the right forum to ask the question that I have:
We are currently discussing free dual vulnerabilities of our software security class, which is why I know that the code given below is supposed to be an example of how a free dual can be exploited. Now, I try to understand this example and hope that someone here can help me with that.

The first thing done in this code is the definition of a struct auth. We use this structure by defining a pointer to such a structure:
struct auth * auth;

D & # 39; agreement. I think that a vulnerability can only be malloc or free have been used. But what could possibly be exploited in this specific code? I do not see it I remember class that the problem with the application free The same pointer repeats twice: now, the front and back pointers of the block point to the same block in which they are themselves stored. That's where my knowledge ends.

I would be so happy to find someone here, who could help!

Code to discuss