POINTERS MCQ QUESTION 4

Q­4 What is the problem with the following code #include<stdio.h>
int main()
{
int *ptr = (int *)malloc(sizeof(int));
ptr = NULL;
free(ptr);
}
how is memory leak the answer.please explain?