From nobody Mon Feb 9 15:11:12 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1676455584; cv=none; d=zohomail.com; s=zohoarc; b=kTeGi/pWpwF50FwKf3zaiyp+y/IW+yVwhl5hKcSml5mKRnlJJeW/Ur1eBxWoKBYr89L1Y+ZvhebmjbySOrY7eRcnocrfQA9eqakkwJ1VKkY6ZJB4INMNAMqAd4k7GSSJ7A4lfoisyGknpy4oFXTk0X8zA7qgWsDO+uWjo2hWCHY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676455584; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Rvmxr6kDUhXUu6ONnk6o73FVqMSoeUwUc0/3Fs/IxmU=; b=DrlSI0faS5QSk7vbc52EBifKzQoPyiQPA3WcjXInT7kLcK0ZLDe0zalsn/4ACFttFs44VUZBGN2DhrKmX0IVg4TD3G8rR9EFQ7B+Tk/+v/4fmE+pCI/mCxK1sncXIL1alF6fVoeCkNYkK10qgQ4mtx5Db49f1fgYvhC8uTP/SK0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1676455584722378.95771771181376; Wed, 15 Feb 2023 02:06:24 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-519-kPKf_82tOIGVxKJ4R5Qc1Q-1; Wed, 15 Feb 2023 05:06:22 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 16792380662D; Wed, 15 Feb 2023 10:06:19 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 393D018EC1; Wed, 15 Feb 2023 10:06:17 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 14E791946589; Wed, 15 Feb 2023 10:06:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 508531946588 for ; Wed, 15 Feb 2023 10:06:16 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 31A372166B34; Wed, 15 Feb 2023 10:06:16 +0000 (UTC) Received: from speedmetal.redhat.com (ovpn-208-8.brq.redhat.com [10.40.208.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6F2DE2166B30 for ; Wed, 15 Feb 2023 10:06:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676455583; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Rvmxr6kDUhXUu6ONnk6o73FVqMSoeUwUc0/3Fs/IxmU=; b=KTCzMciBQ93Bl08unOYX9kIXyPnUdaD7VEbbTJj4RBXO0R6TutEakXUEGaF4cUxqC6O+ad hcXEgvIDyF76MFKbgFB7bjmankkw+vsdHbXPgccGIj3iXAVmZj7REgrZNPEYtrIPkT1X+P LQwfzgaI3JfRrEgTXIetRBm7VKe9Li8= X-MC-Unique: kPKf_82tOIGVxKJ4R5Qc1Q-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/3] virLogCleanerShutdown: Don't call g_regex_unref on NULL regex Date: Wed, 15 Feb 2023 11:06:11 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1676455585117100001 Content-Type: text/plain; charset="utf-8" Shutdown of virtlogd prints: (process:54742): GLib-CRITICAL **: 11:00:40.873: g_regex_unref: assertion= 'regex !=3D NULL' failed Use g_clear_pointer instead which prevents it in the NULL case. Fixes: 69eeef5dfbf Signed-off-by: Peter Krempa Reviewed-by: Daniel P. Berrang=C3=A9 --- src/logging/log_cleaner.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/logging/log_cleaner.c b/src/logging/log_cleaner.c index bb8f719f1b..38f818f177 100644 --- a/src/logging/log_cleaner.c +++ b/src/logging/log_cleaner.c @@ -264,6 +264,5 @@ virLogCleanerShutdown(virLogHandler *handler) handler->cleanup_log_timer =3D -1; } - g_regex_unref(log_regex); - log_regex =3D NULL; + g_clear_pointer(&log_regex, g_regex_unref); } --=20 2.39.1