diff options
author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2024-02-20 06:09:44 +0100 |
---|---|---|
committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2024-02-20 17:57:46 +0100 |
commit | 53f2539b6a410984c43af96ffd81113ddd6ad21b (patch) | |
tree | 5e392acea5db5ecc330e9a8a71e56cf8c6c58c39 | |
parent | 18e2906d626663cca00f8be58a51b4a32961feb1 (diff) |
fpi-byte-writer: Use nicer API to unset the parent data
-rw-r--r-- | libfprint/fpi-byte-writer.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libfprint/fpi-byte-writer.c b/libfprint/fpi-byte-writer.c index 2f55fcf..80c2c04 100644 --- a/libfprint/fpi-byte-writer.c +++ b/libfprint/fpi-byte-writer.c @@ -211,10 +211,9 @@ fpi_byte_writer_reset_and_get_data (FpiByteWriter * writer) g_return_val_if_fail (writer != NULL, NULL); - data = (guint8 *) writer->parent.data; + data = (guint8 *) g_steal_pointer (&writer->parent.data); if (!writer->owned) data = g_memdup2 (data, writer->parent.size); - writer->parent.data = NULL; fpi_byte_writer_reset (writer); return data; |