SmallerC icon indicating copy to clipboard operation
SmallerC copied to clipboard

Memory leaks fixes

Open aleexmaftei opened this issue 3 years ago • 1 comments

Fixes for Issue #32.

aleexmaftei avatar Apr 12 '22 13:04 aleexmaftei

Looks quite nice. Ping @alexfru :)

sskras avatar Jul 13 '23 09:07 sskras

Haven't looked at everything yet, but the added va_end(vl);'s need to be under the same #if... as the matching va_start(vl, format);.

alexfru avatar Mar 09 '24 07:03 alexfru

On top of that:

  • declaration of oldpp will fail to compile with pre-C99 compilers
  • oldpp needs to be updated after successful call to realloc()
  • there's another instance of fatargs() in ucpp
  • main(), which calls fatargs(), doesn't free memory it receives from fatargs(), but I'm too lazy to fix this one now

I'm gonna fix these (except main()'s) myself.

alexfru avatar Mar 10 '24 06:03 alexfru