mm2 / Little-CMS

A free, open source, CMM engine. It provides fast transforms between ICC profiles.
https://www.littlecms.com
MIT License
549 stars 174 forks source link

tweak: nullify freed tags inside freeOneTag(), where it is more suitable #399

Closed GerHobbelt closed 1 year ago

GerHobbelt commented 1 year ago

nullify freed tags inside freeOneTag(), where it is more suitable than where it was done before (now we hit both spots where this call is used; slightly cleaner code this way)

Easiest to see what's been changed by looking at the diffs, I suppose.


Extracted these edits from my own fork (based off another git repo, related to mupdf) during a manual source tree review with your master branch. Trivial stuff, really. 😊

mm2 commented 1 year ago

Sorry I cannot get this one. freeOneTag() is called twice. In one of this calls setting the pointer to null has no effect. So, your change trades an assignment after the function call by an assignment not needed at all.