summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2021-10-28 17:45:51 +0200
committerJens Georg <mail@jensge.org>2021-10-28 17:45:51 +0200
commitb5ed6be7afa44102cb0484106af2fa5676e51d68 (patch)
treed5463c6c70a9fa86daebe3bcd569304e6e6cdedc
parent723f24ab3c5ee4db1b5e25f7c05ab18862a58e33 (diff)
downloadgssdp-b5ed6be7afa44102cb0484106af2fa5676e51d68.tar.gz
SocketSource: Small code clean-up
-rw-r--r--libgssdp/gssdp-socket-source.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libgssdp/gssdp-socket-source.c b/libgssdp/gssdp-socket-source.c
index 438ca82..6cb0a66 100644
--- a/libgssdp/gssdp-socket-source.c
+++ b/libgssdp/gssdp-socket-source.c
@@ -345,10 +345,9 @@ gssdp_socket_source_do_init (GInitable *initable,
success = TRUE;
error:
- if (bind_address != NULL)
- g_object_unref (bind_address);
- if (group != NULL)
- g_object_unref (group);
+ g_clear_object (&bind_address);
+ g_clear_object (&group);
+
if (!success)
/* Be aware that inner_error has already been free'd by
* g_propagate_error(), so we cannot access its contents