What happens inside memory if we try to free a pointer which is pointing to NULL? Is that ever valid?
Why does it not show any warning/error messages?
What happens inside memory if we try to free a pointer which is pointing to NULL. is that ever valid?
Nothing.
why does it not show any warning/error messages?
First, the behaviour is valid by definition, so no error or warning needs to be issued.
Second, a pointer is pointing to NULL at runtime. How should a warning or error message be displayed, if at all? Imagine that you are playing a game called Kill the Zombie and while two of these beings are attacking you, a popup error message appears, saying: "Warning, NULL pointer freed."