[aravis] gv_stream: fix object leak.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis] gv_stream: fix object leak.
- Date: Tue, 27 Sep 2011 14:53:06 +0000 (UTC)
commit 710941b74de894a170a12b16dbfb02f08dc02cef
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Tue Sep 27 16:51:23 2011 +0200
gv_stream: fix object leak.
src/arvgvstream.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/arvgvstream.c b/src/arvgvstream.c
index a66e511..be1a000 100644
--- a/src/arvgvstream.c
+++ b/src/arvgvstream.c
@@ -676,12 +676,15 @@ guint16
arv_gv_stream_get_port (ArvGvStream *gv_stream)
{
GInetSocketAddress *local_address;
+ guint16 port;
g_return_val_if_fail (ARV_IS_GV_STREAM (gv_stream), 0);
local_address = G_INET_SOCKET_ADDRESS (g_socket_get_local_address (gv_stream->socket, NULL));
+ port = g_inet_socket_address_get_port (local_address);
+ g_object_unref (local_address);
- return g_inet_socket_address_get_port (local_address);
+ return port;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]