After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 681942 - Add more warnings and fix a file leak
Add more warnings and fix a file leak
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: libgnome-desktop
unspecified
Other All
: Normal normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-08-15 19:56 UTC by William Jon McCann
Modified: 2012-08-24 22:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Show an error when saving a thumbnail fails (3.16 KB, patch)
2012-08-15 19:56 UTC, William Jon McCann
reviewed Details | Review
Remove the temporary file when saving a thumbnail fails (962 bytes, patch)
2012-08-15 19:56 UTC, William Jon McCann
committed Details | Review
Show an error when saving a thumbnail fails (2.96 KB, patch)
2012-08-15 23:02 UTC, William Jon McCann
committed Details | Review

Description William Jon McCann 2012-08-15 19:56:18 UTC
This adds more warnings and fixes a file leak
Comment 1 William Jon McCann 2012-08-15 19:56:20 UTC
Created attachment 221306 [details] [review]
Show an error when saving a thumbnail fails
Comment 2 William Jon McCann 2012-08-15 19:56:23 UTC
Created attachment 221307 [details] [review]
Remove the temporary file when saving a thumbnail fails
Comment 3 Colin Walters 2012-08-15 22:50:06 UTC
Review of attachment 221306 [details] [review]:

::: libgnome-desktop/gnome-bg.c
@@ +2631,1 @@
 	

Unintentional debugging leftover?

::: libgnome-desktop/gnome-desktop-thumbnail.c
@@ +1341,3 @@
   guint8 digest[16];
   gsize digest_len = sizeof (digest);
+  GError *error;

I prefer initializing at the same time as declaring, but up to you.

@@ +1413,3 @@
   else
     {
+      g_warning ("Failed to create thumbnail %s: %s", tmp_path, error->message);

No objection to this since the function doesn't take a GError now, but were we to change this API, I think adding a GError and letting the caller handle it would make sense.
Comment 4 Colin Walters 2012-08-15 22:50:23 UTC
Review of attachment 221307 [details] [review]:

Makes sense.
Comment 5 William Jon McCann 2012-08-15 23:02:37 UTC
Created attachment 221329 [details] [review]
Show an error when saving a thumbnail fails
Comment 6 Colin Walters 2012-08-15 23:13:06 UTC
Review of attachment 221329 [details] [review]:

Looks fine.
Comment 7 William Jon McCann 2012-08-24 22:19:17 UTC
Attachment 221307 [details] pushed as 715b3ae - Remove the temporary file when saving a thumbnail fails
Attachment 221329 [details] pushed as 778b684 - Show an error when saving a thumbnail fails