[op5-users] [PATCH] Free parsed config structure in module.c

Sean Millichamp sean at bruenor.org
Fri Oct 30 16:09:32 CET 2009


This patch free()s the cfg_comp structure containing the parsed
configuration data in the module.  It slightly reduces the memory use
and, currently, the pointer to the cfg_comp structure is lost rendering
it unusable anyway.

All of the config parsing structures perform strdup()s on the strings
they want to keep, except slurp_selection().  This adds a strdup() there
too making it safe to perform the free of the cfg_comp structure.

As an added bonus, it quiets up valgrind output a bit :)

Thanks,
Sean

-------------- next part --------------
A non-text attachment was scrubbed...
Name: merlin-module-free-configdata.patch
Type: text/x-patch
Size: 479 bytes
Desc: not available
Url : http://lists.op5.com/pipermail/op5-users/attachments/20091030/59a3b1df/attachment.bin 


More information about the op5-users mailing list