diff options
| author | Fuwn <[email protected]> | 2022-06-19 19:25:52 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-06-19 19:25:52 -0700 |
| commit | a8df5b4080e562c17b9fa038f51664958e3acaa4 (patch) | |
| tree | eefaf5647249ab4b3032bd43b5d42254fbb1d451 | |
| parent | feat(macros): string equality macros (diff) | |
| download | tatl-a8df5b4080e562c17b9fa038f51664958e3acaa4.tar.xz tatl-a8df5b4080e562c17b9fa038f51664958e3acaa4.zip | |
fix(set): free previous tag on set
| -rw-r--r-- | src/context/set.c | 2 |
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); |