Changeset f25df21 for cmd.c


Ignore:
Timestamp:
Mar 24, 2011, 4:05:29 PM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, 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
  • cmd.c

    re56303f rf25df21  
    3333}
    3434
    35 /* free the list with owl_cmddict_namelist_cleanup */
    3635void owl_cmddict_get_names(const owl_cmddict *d, owl_list *l) {
    3736  owl_dict_get_keys(d, l);
     
    4039const owl_cmd *owl_cmddict_find(const owl_cmddict *d, const char *name) {
    4140  return owl_dict_find_element(d, name);
    42 }
    43 
    44 void owl_cmddict_namelist_cleanup(owl_list *l)
    45 {
    46   owl_list_cleanup(l, g_free);
    4741}
    4842
Note: See TracChangeset for help on using the changeset viewer.