abria / TeraStitcher

A tool for fast automatic 3D-stitching of teravoxel-sized microscopy images
http://abria.github.io/TeraStitcher/
Other
78 stars 32 forks source link

Initialize internal buffer pointer to NULL #86

Closed chrisroat closed 3 years ago

chrisroat commented 3 years ago

It is good practice to initialize pointers (to NULL, if nothing else). There seems to be a code path where this pointer could be returned to the user with the intention to have it deallocated, though I admit I do not follow all the code's logic well enough to know if this would happen in practice.

In examining the code, this line seemed like a candidate to solve the problem in #83 - and it seems to have, at least in my application.

I am aware that memory issues are hard to diagnose, and simply recompiling with this change could have moved the issue elsewhere (where my application does not tickle it). So I am not certain this is 100% a fix.

chrisroat commented 3 years ago

Closing this because of all the whitespace changes. Will resubmit.