Here's a lit of urgent fixes. The first one most like will get rid of a bunch
of crashes due to lingering calls, and the second one fixes a big memory leak
for directconns; you don't want to leak 2GB of memory when sending 2GB files =/
Felipe Contreras (2):
peer-call: remove extra link ref
dc: fix a big mem leak
cvr/pn_direct_conn.c | 5 ++++-
cvr/pn_peer_call.c | 2 --
2 files changed, 4 insertions(+), 3 deletions(-)
Signed-off-by: Felipe Contreras <felipe.c...@gmail.com>
---
cvr/pn_peer_call.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/cvr/pn_peer_call.c b/cvr/pn_peer_call.c
index 403d787..cb96a2e 100644
--- a/cvr/pn_peer_call.c
+++ b/cvr/pn_peer_call.c
@@ -59,7 +59,6 @@ pn_peer_call_new(struct pn_peer_link *link)
call->link = link;
- pn_peer_link_ref(link);
pn_peer_link_add_call(link, call);
/* The official client seems to timeout calls after 5 minutes */
@@ -93,7 +92,6 @@ pn_peer_call_free(struct pn_peer_call *call)
call->end_cb(call, session);
pn_peer_link_remove_call(call->link, call);
- pn_peer_link_unref(call->link);
if (call->xfer)
purple_xfer_unref(call->xfer);
--
1.6.6.1
diff --git a/cvr/pn_direct_conn.c b/cvr/pn_direct_conn.c
index 42f98d7..35ca6e4 100644
--- a/cvr/pn_direct_conn.c
+++ b/cvr/pn_direct_conn.c
@@ -150,11 +150,14 @@ pn_direct_conn_send_msg(struct pn_direct_conn *direct_conn, MsnMessage *msg)
if (direct_conn->status == 1) {
async_write(direct_conn, NULL, NULL, body, body_len, NULL, NULL);
- return;
+ goto leave;
}
direct_conn->last_msg = msn_message_ref(msg);
async_write(direct_conn, msg_cb, msg, body, body_len, NULL, NULL);
+
+leave:
+ g_free(body);
}
static void
--
1.6.6.1