From 0d9d7dcb4601a60b464c2c257a6febc376503067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 9 Dec 2020 02:02:45 +0100 Subject: [PATCH] fp-print: Don't deference the passed error, use g_set_error instead It still may be NULL, but we don't protect from that. --- libfprint/fp-print.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libfprint/fp-print.c b/libfprint/fp-print.c index a4e8350..522e942 100644 --- a/libfprint/fp-print.c +++ b/libfprint/fp-print.c @@ -875,8 +875,7 @@ fp_print_deserialize (const guchar *data, return g_steal_pointer (&result); invalid_format: - *error = g_error_new_literal (G_IO_ERROR, - G_IO_ERROR_INVALID_DATA, - "Data could not be parsed"); + g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_DATA, + "Data could not be parsed"); return NULL; }