Index: trunk/src/libcschem/attrib.c =================================================================== --- trunk/src/libcschem/attrib.c (revision 10282) +++ trunk/src/libcschem/attrib.c (revision 10283) @@ -417,7 +417,11 @@ csch_attrib_t *s = csch_attrib_dup(e->value); csch_attrib_t *d = csch_attrib_get(dst, e->key); - if ((s != NULL) && (d != NULL) && (csch_attrib_val_eq_(s, d))) continue; /* do not merge if values are the same */ + if ((s != NULL) && (d != NULL) && (csch_attrib_val_eq_(s, d))) { + /* do not merge if values are the same */ + attr_free(s); + continue; + } if (s->val == NULL) { /* source is an array */ int done = 0; @@ -459,6 +463,8 @@ csch_attr_modify_str(sheet, dst_obj, s->prio, e->key, s->val, source, 1); else csch_attrib_set(dst, s->prio, e->key, s->val, source, NULL); + attr_free(s); + s = NULL; } } }