profile library memory leaks introduced when malloc returns 0
authorEzra Peisach <epeisach@mit.edu>
Wed, 26 Sep 2007 15:15:33 +0000 (15:15 +0000)
committerEzra Peisach <epeisach@mit.edu>
Wed, 26 Sep 2007 15:15:33 +0000 (15:15 +0000)
commitcf3a311a561ade506913c4ba0e38b6e5adf9f9b4
tree6e6f9c9674dda75178f76baf3bfb8b2ae6ae8950
parent15b107eb626219ec807730f36c73a1e3fb4b35a4
profile library memory leaks introduced when malloc returns 0

I have a modified version of valgrind that will allow me to have
malloc fail in a controlled way.  A number of memory leaks in error return
passes exist in the profile library.  They are essentially inconsequental - but
my goal is to eventually create a test harness that tries to cover all code -
including error returns...

prof_parse.c: (profile_parse_file): Free node being created if
      parse_line() fails.

prof_file.c (profile_open_file): free prf_data_t on malloc failure

prof_tree.c (profile_create_node): The magic element must be set
    before calling profile_free_node for it to release memory.

ticket: new

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19981 dc483132-0cff-0310-8789-dd5450dbe970
src/util/profile/prof_file.c
src/util/profile/prof_parse.c
src/util/profile/prof_tree.c