!32 context: Small code cleanup
From: @linker99 Reviewed-by: @Charlie_li Signed-off-by: @Charlie_li
This commit is contained in:
commit
bfffa6c169
40
context-Small-code-cleanup.patch
Normal file
40
context-Small-code-cleanup.patch
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
From 35bba25ca93701e330ea258f15f0310f11b27774 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jens Georg <mail@jensge.org>
|
||||||
|
Date: Wed, 19 May 2021 19:43:46 +0200
|
||||||
|
Subject: [PATCH] context: Small code cleanup
|
||||||
|
|
||||||
|
---
|
||||||
|
libgupnp/gupnp-context.c | 10 ++--------
|
||||||
|
1 file changed, 2 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libgupnp/gupnp-context.c b/libgupnp/gupnp-context.c
|
||||||
|
index 460179e..58d3abf 100644
|
||||||
|
--- a/libgupnp/gupnp-context.c
|
||||||
|
+++ b/libgupnp/gupnp-context.c
|
||||||
|
@@ -331,10 +331,7 @@ gupnp_context_dispose (GObject *object)
|
||||||
|
context = GUPNP_CONTEXT (object);
|
||||||
|
priv = gupnp_context_get_instance_private (context);
|
||||||
|
|
||||||
|
- if (priv->session) {
|
||||||
|
- g_object_unref (priv->session);
|
||||||
|
- priv->session = NULL;
|
||||||
|
- }
|
||||||
|
+ g_clear_object (&priv->session);
|
||||||
|
|
||||||
|
while (priv->host_path_datas) {
|
||||||
|
HostPathData *data;
|
||||||
|
@@ -344,10 +341,7 @@ gupnp_context_dispose (GObject *object)
|
||||||
|
gupnp_context_unhost_path (context, data->server_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (priv->server) {
|
||||||
|
- g_object_unref (priv->server);
|
||||||
|
- priv->server = NULL;
|
||||||
|
- }
|
||||||
|
+ g_clear_object (&priv->server);
|
||||||
|
|
||||||
|
/* Call super */
|
||||||
|
object_class = G_OBJECT_CLASS (gupnp_context_parent_class);
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: gupnp
|
Name: gupnp
|
||||||
Version: 1.2.4
|
Version: 1.2.4
|
||||||
Release: 5
|
Release: 6
|
||||||
Summary: UPnP devices & control points creation framework
|
Summary: UPnP devices & control points creation framework
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://www.gupnp.org/
|
URL: http://www.gupnp.org/
|
||||||
@ -10,6 +10,7 @@ Patch1: ServiceProxy-Remove-bogos-function-rename.patch
|
|||||||
Patch2: linux-cm-Fds-can-be-0.patch
|
Patch2: linux-cm-Fds-can-be-0.patch
|
||||||
Patch3: service-action-Protect-against-unsent-message-use.patch
|
Patch3: service-action-Protect-against-unsent-message-use.patch
|
||||||
Patch4: service-action-Do-not-leak-message-if-never-sent.patch
|
Patch4: service-action-Do-not-leak-message-if-never-sent.patch
|
||||||
|
Patch5: context-Small-code-cleanup.patch
|
||||||
|
|
||||||
BuildRequires: gssdp-devel >= 1.2.3 gtk-doc gobject-introspection-devel >= 1.36
|
BuildRequires: gssdp-devel >= 1.2.3 gtk-doc gobject-introspection-devel >= 1.36
|
||||||
BuildRequires: libsoup-devel libxml2-devel libuuid-devel vala meson
|
BuildRequires: libsoup-devel libxml2-devel libuuid-devel vala meson
|
||||||
@ -78,6 +79,9 @@ This package contains help file and developer documentation for gupnp.
|
|||||||
%{_mandir}/man1/gupnp-binding-tool-*
|
%{_mandir}/man1/gupnp-binding-tool-*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Nov 23 2023 fandehui <fandehui@xfusion.com> - 1.2.4-6
|
||||||
|
- context: Small code cleanup
|
||||||
|
|
||||||
* Thu Nov 9 2023 fandehui <fandehui@xfusion.com> - 1.2.4-5
|
* Thu Nov 9 2023 fandehui <fandehui@xfusion.com> - 1.2.4-5
|
||||||
- service-action: Do not leak message if never sent
|
- service-action: Do not leak message if never sent
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user