I have been using c a lot more recently and finding that I really don't like dealing with memory management, or at least the idea that if I malloc a pointer I have to release it even if its the most trivial thing. This has lead me to allocating as much as possible on the stack and using & to get its location. Even making separate int and inptr variables(I've had some lvalue problem with & operator in macros).
I haven't find many places where I have had to deal with passing data up (above/below) where it was allocated. At the same time I need a decent amount of early returns(and I would rather avoid gotos). What is the general c opinion say? Are there any obvious signs I should use one or another in a particular case.
P.S. One thing that made me worry a bit was that I recently got a memory corruption problem due to using the wrong sizeof for malloc and I didn't notice it right away since most of my code paths directly after that point didn't utilise the heap. How big of a problem do you think this sort of corruption hiding might be?