leaks if ret2 != NULL