From 2a335a89a622dcc0428fcd32dbed7841dec5b25f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 28 Nov 2019 21:30:17 +0100 Subject: [PATCH 048/181] fp-print: Set the aligned_data as the data used by the cleanup function g_variant_new_from_data() allows to destroy some other user_data passed as parameter that might be different from the aligned_data itself. But since in this case they match, pass it to be set as g_free parameter or it won't be free'd. --- libfprint/fp-print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfprint/fp-print.c b/libfprint/fp-print.c index 7777db2..ddf8747 100644 --- a/libfprint/fp-print.c +++ b/libfprint/fp-print.c @@ -1009,7 +1009,7 @@ fp_print_deserialize (const guchar *data, memcpy (aligned_data, data + 3, length - 3); raw_value = g_variant_new_from_data (FP_PRINT_VARIANT_TYPE, aligned_data, length - 3, - FALSE, g_free, NULL); + FALSE, g_free, aligned_data); if (!raw_value) goto invalid_format; -- 2.24.1