Open elfring opened 4 years ago
You're right. This one typically confuses people (including myself) because calling free(nullptr)
is usually not a good idea (the C standard says you're allowed to do that, but often people would redefine free and they might not adhere to the standard).
I will tag this for 7.0. This change is relatively simple, if you want to make a PR we would certainly appreciate it. Otherwise we'll do that as soon as someone has time.
How do you think about to use a development tool like “clang-tidy” for corresponding source code adjustments?
this is something we wanted to do for a while. It just has not been prioritized.
An extra null pointer check is not needed in functions like the following.