Changeset f25df21 for help.c


Ignore:
Timestamp:
Mar 24, 2011, 4:05:29 PM (10 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
c809f5e
Parents:
e56303f
git-author:
David Benjamin <davidben@mit.edu> (03/08/11 15:04:52)
git-committer:
David Benjamin <davidben@mit.edu> (03/24/11 16:05:29)
Message:
Don't call owl_list_create in owl_dict_get_keys

Until we get rid of this owl_list thing altogether, there should be a
convention as to who initializes the thing. Otherwise, we leak memory
from people initializing it too many times.

Whoever reviews this probably wants to look over this very carefully in
case I missed one of the owl_list_creates.

Also kill the various wrappers over owl_list_cleanup as they are not the
inverse of any operation.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • help.c

    rc38bfe0 rf25df21  
    129129  owl_fmtext_append_bold(&fm,
    130130                         "Variables:\n");
     131  owl_list_create(&varnames);
    131132  owl_variable_dict_get_names(owl_global_get_vardict(&g), &varnames);
    132133  numvarnames = owl_list_get_size(&varnames);
     
    137138    }
    138139  }
    139   owl_variable_dict_namelist_cleanup(&varnames);
     140  owl_list_cleanup(&varnames, g_free);
    140141
    141142  owl_fmtext_append_normal(&fm, "\n");
Note: See TracChangeset for help on using the changeset viewer.