summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2023-02-15 23:51:25 +0100
committerAlbert Cervin <albert@acervin.com>2023-02-15 23:51:25 +0100
commitbc523197ecbfc094455287d9eb036a2727bca684 (patch)
tree53ca53476d4b60e30a367b8437e1ef3c7c4561b6 /src/buffer.c
parente45499816eab8abadbdd5bb6dd79b526a4ed6648 (diff)
downloaddged-bc523197ecbfc094455287d9eb036a2727bca684.tar.gz
dged-bc523197ecbfc094455287d9eb036a2727bca684.tar.xz
dged-bc523197ecbfc094455287d9eb036a2727bca684.zip
Fix double free
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 5cdc22b..0b67c88 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -297,10 +297,6 @@ struct text_chunk *copy_region(struct buffer *buffer, struct region region) {
if (curr->allocated) {
free(curr->text);
- curr->text = NULL;
- curr->nbytes = curr->nchars = 0;
- curr->line = 0;
- curr->allocated = false;
}
struct text_chunk txt =