[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

freeing memory after gethostbyname()



I am writting a small network deamon in c, and just dowloaded a copy of
lclint, which told me that I have a memory leak, great I say, I look at
the code and realize duh, how did i miss that of course i defined a
variable hostinfo of type struct hostent then let gethostbyname fill it
up. So i try to free hostinfo and it complains that it was not allocated
by malloc. So how do I free this memory?

Evan Moore


Reply to: