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.
This commit is contained in:
Marco Trevisan (Treviño) 2019-11-28 21:30:17 +01:00
parent 4447a0d183
commit b9ff75c4e9

View file

@ -1009,7 +1009,7 @@ fp_print_deserialize (const guchar *data,
memcpy (aligned_data, data + 3, length - 3); memcpy (aligned_data, data + 3, length - 3);
raw_value = g_variant_new_from_data (FP_PRINT_VARIANT_TYPE, raw_value = g_variant_new_from_data (FP_PRINT_VARIANT_TYPE,
aligned_data, length - 3, aligned_data, length - 3,
FALSE, g_free, NULL); FALSE, g_free, aligned_data);
if (!raw_value) if (!raw_value)
goto invalid_format; goto invalid_format;