Changeset 55b2de8 for variable.c
- Timestamp:
- May 12, 2011, 4:39:26 PM (14 years ago)
- Children:
- 7fd0bf7
- Parents:
- 13ee8f2
- git-author:
- David Benjamin <davidben@mit.edu> (05/07/11 15:12:09)
- git-committer:
- David Benjamin <davidben@mit.edu> (05/12/11 16:39:26)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
variable.c
rf203cad r55b2de8 641 641 642 642 void owl_variable_update(owl_variable *var, const char *summary, const char *desc) { 643 if(var->summary)g_free(var->summary);643 g_free(var->summary); 644 644 var->summary = g_strdup(summary); 645 if(var->description)g_free(var->description);645 g_free(var->description); 646 646 var->description = g_strdup(desc); 647 647 } … … 651 651 if(old) { 652 652 owl_variable_update(old, summ, desc); 653 if(old->pval_default)g_free(old->pval_default);653 g_free(old->pval_default); 654 654 old->pval_default = g_strdup(initval); 655 655 } else { … … 944 944 void owl_variable_delete_default(owl_variable *v) 945 945 { 946 if (v->val)g_free(v->val);946 g_free(v->val); 947 947 } 948 948 … … 1076 1076 if (!v->validate_fn(v, newval)) return(-1); 1077 1077 } 1078 if (v->val)g_free(v->val);1078 g_free(v->val); 1079 1079 v->val = g_strdup(newval); 1080 1080 return(0);
Note: See TracChangeset
for help on using the changeset viewer.