core: Don't leak memory if error is unknown

If error is unknown, the "return 1" call was not freeing error which was
malloced at the beginning of the function.
1 file changed