It's wrong to be fed out when smelling bad (5)
I believe the answer is:
fetid
'smelling bad' is the definition.
'fetid' can be an answer for 'bad' (thesaurus). I'm not certain of the 'smelling' bit.
'it's wrong to be fed out' is the wordplay.
'wrong' indicates anagramming the letters.
'to be fed' indicates putting letters inside.
'out' becomes 'fed' (I can't justify this - if you can you should believe this answer much more).
'it' is an anagram of 'ti'.
'ti' placed within 'fed' is 'FETID'.
'when' acts as a link.
Can you help me to learn more?
(Other definitions for fetid that I've seen before include "Nauseating" , "Putrid and stinking" , "Smelly through decay" , "Smelling bad, stinking" , "Noisome" .)