diff options
Diffstat (limited to 'mail/e-mail-display.c')
-rw-r--r-- | mail/e-mail-display.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c index c610636ee9..74010e1ff9 100644 --- a/mail/e-mail-display.c +++ b/mail/e-mail-display.c @@ -314,7 +314,7 @@ find_element_by_id (WebKitDOMDocument *document, const gchar *id) { WebKitDOMNodeList *frames; - WebKitDOMElement *element; + WebKitDOMElement *element = NULL; gulong ii, length; if (!WEBKIT_DOM_IS_DOCUMENT (document)) @@ -342,10 +342,12 @@ find_element_by_id (WebKitDOMDocument *document, element = find_element_by_id (frame_doc, id); if (element != NULL) - return element; + goto out; } + out: + g_object_unref (frames); - return NULL; + return element; } static void @@ -924,6 +926,7 @@ setup_image_click_event_listeners_on_document (WebKitDOMDocument *document, G_CALLBACK (toggle_address_visibility), FALSE, NULL); } + g_object_unref (list); } static void @@ -2110,10 +2113,14 @@ mail_display_get_frame_selection_text (WebKitDOMElement *iframe) text = mail_display_get_frame_selection_text ( WEBKIT_DOM_ELEMENT (node)); - if (text != NULL) + if (text != NULL) { + g_object_unref (frames); return text; + } } + g_object_unref (frames); + return NULL; } @@ -2142,10 +2149,14 @@ e_mail_display_get_selection_plain_text (EMailDisplay *display) text = mail_display_get_frame_selection_text ( WEBKIT_DOM_ELEMENT (node)); - if (text != NULL) + if (text != NULL) { + g_object_unref (frames); return text; + } } + g_object_unref (frames); + return NULL; } |