mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
fpi-byte-writer: Initialize the parent size when initializing with size
This commit is contained in:
@@ -76,6 +76,7 @@ fpi_byte_writer_new_with_size (guint size, gboolean fixed)
|
||||
|
||||
ret->alloc_size = size;
|
||||
ret->parent.data = g_malloc (ret->alloc_size);
|
||||
ret->parent.size = size;
|
||||
ret->fixed = fixed;
|
||||
ret->owned = TRUE;
|
||||
|
||||
@@ -143,6 +144,7 @@ fpi_byte_writer_init_with_size (FpiByteWriter * writer, guint size,
|
||||
fpi_byte_writer_init (writer);
|
||||
|
||||
writer->parent.data = g_malloc (size);
|
||||
writer->parent.size = size;
|
||||
writer->alloc_size = size;
|
||||
writer->fixed = fixed;
|
||||
writer->owned = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user