network: Fix a possible memory leak in QR code
It's possible that the QR code for the same text has been requested, but for a different size. Fix a memory leak that would happen in those cases.
This commit is contained in:
parent
7c9c42fb65
commit
0452e9eb4d
1 changed files with 1 additions and 0 deletions
|
@ -175,6 +175,7 @@ cc_qr_code_get_paintable (CcQrCode *self,
|
|||
|
||||
bytes = g_byte_array_free_to_bytes (qr_matrix);
|
||||
|
||||
g_clear_object (&self->texture);
|
||||
self->texture = gdk_memory_texture_new (total_size,
|
||||
total_size,
|
||||
GDK_MEMORY_R8G8B8,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue