Check NULL before calling free

In TortoiseGit we're experiencing a significant number of crashes with free in errors.c, however, we don't know where exactly (the crashreports we have point to https://github.com/libgit2/libgit2/blob/master/src/errors.c#L74, but there is no `free` - but in set_error there is a `free`).

So: Might it be possible that error->message is uninitialized or error->message is NULL (the crashreports do not include any variable assignments)?

This PR assumes that it is NULL and tries to fix that.