[flashrom] [PATCH 0/3] Fix memleaks

Stefan Tauner stefan.tauner at student.tuwien.ac.at
Fri Sep 14 00:38:06 CEST 2012


This is probably just a start, but these patches are fixes for the most
trivial problems valgrind was able to find in my tests.
The libpci code leaks a lot and the cli_classic_abort_usage() function
needs to die sooner than later... and the layout patches need to be
merged eventually ;)

For reusable variables it may make sense to create a cleanup function or
macro like this:
#define clean(p)    free(p);(p) = NULL
what do you think?

Stefan Tauner (3):
  Fix memleaks in dmi.c.
  Fix memleaks in cli_classic.c.
  Fix memleak in the dummyflasher.

 cli_classic.c  |   15 +++++++++++++++
 dmi.c          |   14 +++++++++++++-
 dummyflasher.c |    5 +++--
 flashrom.c     |    1 +
 4 files changed, 32 insertions(+), 3 deletions(-)

-- 
Kind regards, Stefan Tauner





More information about the flashrom mailing list