fix memory leak in cp_vset()
This commit is contained in:
parent
9a75774e36
commit
76336fa21b
|
|
@ -119,6 +119,7 @@ cp_vset(char *varname, enum cp_types type, void *value)
|
||||||
tfree(v->va_name);
|
tfree(v->va_name);
|
||||||
tfree(v);
|
tfree(v);
|
||||||
}
|
}
|
||||||
|
tfree(copyvarname);
|
||||||
return;
|
return;
|
||||||
} else
|
} else
|
||||||
v->va_bool = TRUE;
|
v->va_bool = TRUE;
|
||||||
|
|
@ -144,6 +145,7 @@ cp_vset(char *varname, enum cp_types type, void *value)
|
||||||
fprintf(cp_err,
|
fprintf(cp_err,
|
||||||
"cp_vset: Internal Error: bad variable type %d.\n",
|
"cp_vset: Internal Error: bad variable type %d.\n",
|
||||||
type);
|
type);
|
||||||
|
tfree(copyvarname);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
v->va_type = type;
|
v->va_type = type;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue