From e178a9f5bf9f383c5ba1a49597e715f08217ed91 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Wed, 6 Apr 2011 14:17:57 +0300 Subject: [PATCH] do not keep a pointer to an unreferenced object On success, the pointer is overwritten without refcount changes, but on error, the offer is unreffed, and the current_offer pointer would be left dangling. --- telepathy-farstream/call-content.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/telepathy-farstream/call-content.c b/telepathy-farstream/call-content.c index 15d09ff..f50ef42 100644 --- a/telepathy-farstream/call-content.c +++ b/telepathy-farstream/call-content.c @@ -1121,11 +1121,13 @@ _tf_call_content_get_fsstream_by_handle (TfCallContent *content, && content->current_offer_contact_handle == contact_handle) { GList *codecs = content->current_offer_fscodecs; + TpProxy *current_offer = content->current_offer; content->current_offer_fscodecs = NULL; + content->current_offer = NULL; /* ownership transfers to try_codecs */ process_codec_offer_try_codecs (content, s, - content->current_offer, codecs); + current_offer, codecs); } return s; -- 1.7.2.2