fix a free() call