[Commits] [SCM] claws branch, master, updated. 3.14.0-116-g53ea6f8

mones at claws-mail.org mones at claws-mail.org
Tue Oct 18 00:13:34 CEST 2016


The branch, master has been updated
       via  53ea6f806cd72e597d86bcfa24c9c813e1034e79 (commit)
      from  e62c01edd0c6bfc6c9c2e7b9645497603b8f8e83 (commit)

Summary of changes:
 src/plugins/libravatar/libravatar_image.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit 53ea6f806cd72e597d86bcfa24c9c813e1034e79
Author: Ricardo Mones <ricardo at mones.org>
Date:   Tue Oct 18 00:13:24 2016 +0200

    Fix resource leak and missing return

diff --git a/src/plugins/libravatar/libravatar_image.c b/src/plugins/libravatar/libravatar_image.c
index fa1f78a..30c9e37 100644
--- a/src/plugins/libravatar/libravatar_image.c
+++ b/src/plugins/libravatar/libravatar_image.c
@@ -81,6 +81,7 @@ static GdkPixbuf *pixbuf_from_url(const gchar *url, const gchar *md5, const gcha
 	curl = curl_easy_init();
 	if (curl == NULL) {
 		g_warning("could not initialize curl to get image from URL");
+		fclose(file);
 		return NULL;
 	}
 
@@ -141,7 +142,7 @@ GdkPixbuf *libravatar_image_fetch(AvatarImageFetch *ctx)
 	pthread_t pt;
 #endif
 
-	g_return_if_fail(ctx != NULL);
+	g_return_val_if_fail(ctx != NULL, NULL);
 
 #ifdef USE_PTHREAD
 	if (pthread_create(&pt, PTHREAD_CREATE_JOINABLE, get_image_thread, (void *)ctx) != 0) {

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list