Actually, since this is kind of interesting, I'd like to add a further comment regarding Freud and his ideas. Psychoanalytic theory is an interest of mine and I have published on that topic in very respectable peer reviewed journals.
Freud has a mixed record on the issue of homosexuality. My take is that he was uncharacteristically supportive, for the time, and parts of his writings were appropriated by psychoanalists who moved to America, notably Brill. to pathologize homosexuality in ways he never intended. Freud was a social radical in many ways. He was outspokenly in favor of full legal protections and rights for homosexuals. In some of his writings he addressed the nature/nurture issue and concluded that nature was probably the stronger factor. He wrote a very sensitively worded letter to a woman who inquired about him "helping" her adult son. His response was that homosexuality was not a pathological condition and that, in fact, some of the most important contributors to human civilization ahd been so. He mentioned Leonardo da Vinci, as an example.
The thing is that he was trying to establish his theories, which were heavily based on the issue of how children connect with their parents, so that was emphasized more frequently. I have a published paper on this topic but posting even parts of it would reveal my identity. If there is any actual interest, I can put together a collection of Freud quotes on the topic.
About him having been addicted to cocaine, this is true. The surrounding context is that he developed bone cancer in his jaw relatively early in life, forty-two, if I recall correctly, and had repeated surgeries almost every year to remove more cancerous bone. This split his jaw so he had a series of ever larger wooden prostheses to keep it in it's correct shape. That he didn't die of infection in the first three days is a miracle. Remember, this was well before the advent of antibiotics. This went on for nearly thirty years! Cocaine is a local anesthetic, and that is how his addiction got started. Compounding this was his lifelong depression. It is thought that cocaine became his antidepressant medication.
By the time he was seventy nine, he had practically no jaw, couldn't eat, was severely malnourished, and in constant pain. However, he was quite lucid. It was revealed a few years ago that this was the point at which he, his personal physician, and his daughter consulted and the decision was that he would be given a lethal dose of morphine. That was done.
My point on this is that Freud had a writing career of about fifty years. He modified a number of his positions many times.