aboutsummaryrefslogtreecommitdiffstats
path: root/libical/scripts/mkderivedvalues.pl
diff options
context:
space:
mode:
Diffstat (limited to 'libical/scripts/mkderivedvalues.pl')
-rwxr-xr-xlibical/scripts/mkderivedvalues.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/libical/scripts/mkderivedvalues.pl b/libical/scripts/mkderivedvalues.pl
index ca2ee4b3a1..103c54a8e2 100755
--- a/libical/scripts/mkderivedvalues.pl
+++ b/libical/scripts/mkderivedvalues.pl
@@ -179,6 +179,14 @@ icalvalue_set_${lc}(icalvalue* value, $type v)
icalerror_check_value_type(value, ICAL_${uc}_VALUE);
impl = (struct icalvalue_impl*)value;
+EOM
+
+if( ${union_data} eq 'string'){
+print" if(impl->data.v_${union_data}!=0) {free(impl->data.v_${union_data});}\n";
+}
+
+print <<EOM;
+
impl->data.v_${union_data} = $assign
}