pidgin/pidgin

fix some other memory leaks
memory-leaks
2019-11-10, Fabrice Bellet
03bafaff77dd
Parents d253f767f6cc
Children 8785aa7408b0
fix some other memory leaks
--- a/libpurple/media.c Mon Oct 21 16:31:36 2019 +0200
+++ b/libpurple/media.c Sun Nov 10 17:47:33 2019 +0100
@@ -950,20 +950,16 @@
PurpleMediaCandidate *c = iter->data;
if (id == purple_media_candidate_get_component_id(c)) {
g_object_unref(c);
- stream->active_local_candidates =
- g_list_delete_link(iter, iter);
- stream->active_local_candidates = g_list_prepend(
+ stream->active_local_candidates = g_list_delete_link(
stream->active_local_candidates,
- purple_media_candidate_copy(
- local_candidate));
+ iter);
break;
}
}
- if (iter == NULL)
- stream->active_local_candidates = g_list_prepend(
- stream->active_local_candidates,
- purple_media_candidate_copy(
- local_candidate));
+ stream->active_local_candidates = g_list_prepend(
+ stream->active_local_candidates,
+ purple_media_candidate_copy(
+ local_candidate));
id = purple_media_candidate_get_component_id(local_candidate);
@@ -972,20 +968,16 @@
PurpleMediaCandidate *c = iter->data;
if (id == purple_media_candidate_get_component_id(c)) {
g_object_unref(c);
- stream->active_remote_candidates =
- g_list_delete_link(iter, iter);
- stream->active_remote_candidates = g_list_prepend(
+ stream->active_remote_candidates = g_list_delete_link(
stream->active_remote_candidates,
- purple_media_candidate_copy(
- remote_candidate));
+ iter);
break;
}
}
- if (iter == NULL)
- stream->active_remote_candidates = g_list_prepend(
- stream->active_remote_candidates,
- purple_media_candidate_copy(
- remote_candidate));
+ stream->active_remote_candidates = g_list_prepend(
+ stream->active_remote_candidates,
+ purple_media_candidate_copy(
+ remote_candidate));
g_signal_emit(media, purple_media_signals[CANDIDATE_PAIR_ESTABLISHED],
0, sess_id, name, local_candidate, remote_candidate);
--- a/libpurple/queuedoutputstream.c Mon Oct 21 16:31:36 2019 +0200
+++ b/libpurple/queuedoutputstream.c Sun Nov 10 17:47:33 2019 +0100
@@ -216,6 +216,7 @@
return;
}
+ g_clear_error (&error);
priv->pending_queued = TRUE;
if (set_pending) {