mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
gst/tcp/: Fix some memory leaks.
Original commit message from CVS: * gst/tcp/gstfdset.c: (gst_fdset_free), (gst_fdset_wait): * gst/tcp/gstmultifdsink.c: (gst_multifdsink_add), (gst_multifdsink_remove_client_link), (gst_multifdsink_client_queue_buffer), (gst_multifdsink_handle_client_write): * gst/tcp/gsttcpclientsink.c: (gst_tcpclientsink_init_send): * gst/tcp/gsttcpclientsrc.c: (gst_tcpclientsrc_init_receive): Fix some memory leaks.
This commit is contained in:
parent
28a56927b4
commit
f8c64679ac
5 changed files with 19 additions and 0 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2004-08-30 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/tcp/gstfdset.c: (gst_fdset_free), (gst_fdset_wait):
|
||||
* gst/tcp/gstmultifdsink.c: (gst_multifdsink_add),
|
||||
(gst_multifdsink_remove_client_link),
|
||||
(gst_multifdsink_client_queue_buffer),
|
||||
(gst_multifdsink_handle_client_write):
|
||||
* gst/tcp/gsttcpclientsink.c: (gst_tcpclientsink_init_send):
|
||||
* gst/tcp/gsttcpclientsrc.c: (gst_tcpclientsrc_init_receive):
|
||||
Fix some memory leaks.
|
||||
|
||||
2004-08-30 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
Patch by: David Schleef
|
||||
|
|
|
@ -135,6 +135,7 @@ gst_fdset_free (GstFDSet * set)
|
|||
break;
|
||||
case GST_FDSET_MODE_POLL:
|
||||
g_free (set->pollfds);
|
||||
g_mutex_free (set->poll_lock);
|
||||
break;
|
||||
case GST_FDSET_MODE_EPOLL:
|
||||
g_warning ("implement me");
|
||||
|
|
|
@ -598,6 +598,11 @@ gst_multifdsink_remove_client_link (GstMultiFdSink * sink, GList * link)
|
|||
g_get_current_time (&now);
|
||||
client->disconnect_time = GST_TIMEVAL_TO_TIME (now);
|
||||
|
||||
/* free client buffers */
|
||||
g_slist_foreach (client->sending, (GFunc) gst_data_unref, NULL);
|
||||
g_slist_free (client->sending);
|
||||
client->sending = NULL;
|
||||
|
||||
/* unlock the mutex before signaling because the signal handler
|
||||
* might query some properties */
|
||||
g_mutex_unlock (sink->clientslock);
|
||||
|
|
|
@ -329,6 +329,7 @@ gst_tcpclientsink_init_send (GstTCPClientSink * this)
|
|||
this->server_sin.sin_family = AF_INET; /* network socket */
|
||||
this->server_sin.sin_port = htons (this->port); /* on port */
|
||||
this->server_sin.sin_addr.s_addr = inet_addr (ip); /* on host ip */
|
||||
g_free (ip);
|
||||
|
||||
GST_DEBUG_OBJECT (this, "connecting to server");
|
||||
ret = connect (this->sock_fd, (struct sockaddr *) &this->server_sin,
|
||||
|
|
|
@ -432,6 +432,7 @@ gst_tcpclientsrc_init_receive (GstTCPClientSrc * this)
|
|||
this->server_sin.sin_family = AF_INET; /* network socket */
|
||||
this->server_sin.sin_port = htons (this->port); /* on port */
|
||||
this->server_sin.sin_addr.s_addr = inet_addr (ip); /* on host ip */
|
||||
g_free (ip);
|
||||
|
||||
GST_DEBUG_OBJECT (this, "connecting to server");
|
||||
ret = connect (this->sock_fd, (struct sockaddr *) &this->server_sin,
|
||||
|
|
Loading…
Reference in a new issue