From fc4875226f4c56f908b0db48d87e025b844148d1 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 4 Jul 2019 16:31:00 -0400 Subject: [PATCH] trimmer: use g_match_info_free instead of g_match_info_unref MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The build fails with glib 2.22: trimmer.c: In function ‘compile_and_match’: trimmer.c:201:3: error: implicit declaration of function ‘g_match_info_unref’; did you mean ‘g_match_info_free’? [-Werror=implicit-function-declaration] g_match_info_unref(*match_info); ^~~~~~~~~~~~~~~~~~ g_match_info_free The g_match_info_unref function is only available from glib 2.30. Use g_match_info_free instead, which does the same for our use case. Change-Id: I9357b9dd18501749e19481e9ef08ec9b01379ee6 Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/1633 Tested-by: jenkins Reviewed-by: Philippe Proulx --- src/plugins/utils/trimmer/trimmer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/utils/trimmer/trimmer.c b/src/plugins/utils/trimmer/trimmer.c index 56ed9683..85c8917d 100644 --- a/src/plugins/utils/trimmer/trimmer.c +++ b/src/plugins/utils/trimmer/trimmer.c @@ -198,7 +198,7 @@ bool compile_and_match(const char *pattern, const char *string, GMatchInfo **mat * FALSE. If there's no match, we have no use for it, so free * it immediatly and don't return it to the caller. */ - g_match_info_unref(*match_info); + g_match_info_free(*match_info); *match_info = NULL; } -- 2.34.1