1. In icalparameter_set_* series function, param->string is overridden with new string. Then the old string gets lost. icalparameter_set_* series functions are in icalderivedparameter.c. This c file is generated by libical/scripts/mkderivedparameters.pl. Just add code to free non-empty param->string before it is overridden.
2. Function "icalcomponent_remove_property" will remove property instance from properties list but don't free the space it holds. So, when call this function, the property instance remove from properties list should be free explicitly. Similarly for "pvl_remove (prop->parameters, p);" it also should be explicitly free memory after remove parameter instance form parameter list.
Qiankun, thanks for you patch. However it looks like someone already applied your patch (maybe it was me, but I forgot :)
so a belated thank you and i'm closing this.