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 733156 - Remove redundant checks for NULL
Remove redundant checks for NULL
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-07-14 13:47 UTC by Marek Kašík
Modified: 2014-07-14 14:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove redundant checks before free (2.14 KB, patch)
2014-07-14 13:47 UTC, Marek Kašík
committed Details | Review

Description Marek Kašík 2014-07-14 13:47:14 UTC
Created attachment 280639 [details] [review]
Remove redundant checks before free

I've grepped sources of glib for checks for NULL just before g_free() (and g_clear_pointer() and g_clear_object()). Here is a patch which removes such redundant checks.
Comment 1 Emmanuele Bassi (:ebassi) 2014-07-14 13:56:24 UTC
Review of attachment 280639 [details] [review]:

looks good to me.
Comment 2 Marek Kašík 2014-07-14 14:32:38 UTC
Comment on attachment 280639 [details] [review]
Remove redundant checks before free

(In reply to comment #1)
> Review of attachment 280639 [details] [review]:
> 
> looks good to me.

Thank you for the review. I've pushed the patch to master.