diff options
author | Campbell Barton <campbell@blender.org> | 2022-06-09 14:32:49 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-06-09 14:32:49 +0300 |
commit | f37a37cafebd1e48685fbb159c15e828264c28db (patch) | |
tree | f6650afb885990ae34447dbe31688bc5d841b5ab /intern | |
parent | 41c7c744eb530e7f67ba0edd718765f12029684c (diff) |
Fix GHOST/Wayland memory leak when copying text
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWayland.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp index 816c5f9c614..a5789a2526f 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cpp +++ b/intern/ghost/intern/GHOST_SystemWayland.cpp @@ -1615,6 +1615,7 @@ void GHOST_SystemWayland::putClipboard(const char *buffer, bool /*selection*/) c data_source_t *data_source = d->inputs[0]->data_source; /* Copy buffer. */ + free(data_source->buffer_out); const size_t buffer_size = strlen(buffer) + 1; data_source->buffer_out = static_cast<char *>(malloc(buffer_size)); std::memcpy(data_source->buffer_out, buffer, buffer_size); |