fixed double free in server.c read_work