Page MenuHomeFreeBSD

GEOM: Remove redundant NULL pointer check before g_free()
ClosedPublic

Authored by zlei on Dec 22 2022, 9:24 AM.
Tags
None
Referenced Files
F166405887: D37779.id114606.diff
Thu, Aug 13, 10:53 AM
F166405886: D37779.id114397.diff
Thu, Aug 13, 10:53 AM
Unknown Object (File)
Tue, Aug 11, 6:29 PM
Unknown Object (File)
Mon, Aug 10, 10:11 PM
Unknown Object (File)
Sat, Aug 8, 4:52 PM
Unknown Object (File)
Fri, Aug 7, 11:30 PM
Unknown Object (File)
Tue, Aug 4, 1:56 AM
Unknown Object (File)
Mon, Jul 20, 12:55 PM
Subscribers
None

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

zlei requested review of this revision.Dec 22 2022, 9:24 AM
zlei created this revision.
This revision is now accepted and ready to land.Dec 22 2022, 4:11 PM
imp accepted this revision.EditedDec 23 2022, 12:56 AM

Confirmed that the comparison is always redundant: g_free just calls free, but even the extra diagnostics that seem to touch g_free doesn't really touch it (it looks for it on lists, which it will never find a null pointer on...) and even if it does find a null pointer somehow, we don't dereference it (though I think it's impossible to find a null pointer).