aboutsummaryrefslogtreecommitdiff
path: root/src/context
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-06-19 19:25:52 -0700
committerFuwn <[email protected]>2022-06-19 19:25:52 -0700
commita8df5b4080e562c17b9fa038f51664958e3acaa4 (patch)
treeeefaf5647249ab4b3032bd43b5d42254fbb1d451 /src/context
parentfeat(macros): string equality macros (diff)
downloadtatl-a8df5b4080e562c17b9fa038f51664958e3acaa4.tar.xz
tatl-a8df5b4080e562c17b9fa038f51664958e3acaa4.zip
fix(set): free previous tag on set
Diffstat (limited to 'src/context')
-rw-r--r--src/context/set.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/context/set.c b/src/context/set.c
index f3aff9d..1a15722 100644
--- a/src/context/set.c
+++ b/src/context/set.c
@@ -28,6 +28,8 @@ void tatl_context_set_mute(struct tatl_context *context, int mute) {
}
void tatl_context_set_tag(struct tatl_context *context, const char *const tag) {
+ free(context->_tag);
+
context->_tag = malloc(strlen(tag) * sizeof(char));
strcpy(context->_tag, tag);