b38d829342
fix for #257. Routine is already taking ownership of the passed event; thus it should free it in case of error.