Live upgrade: fixed little memory leak in error cases, introduced
by previous fix