Mcq doubt - 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);
}
A) Dangling Pointer
B) Memory leak
C) The program may crash as free() is called for NULL pointer.
D) Compiler Error

@prerna_gupta31
(https://www.geeksforgeeks.org/c-dynamic-memory-allocation-question-7/)