fitsio icon indicating copy to clipboard operation
fitsio copied to clipboard

Fix potential free of null pointer in stringlist_delete

Open petesmc opened this issue 4 months ago • 2 comments

Closes #433

petesmc avatar Aug 10 '25 13:08 petesmc

If the pointer given to free is null, the function does nothing

esheldon avatar Sep 03 '25 16:09 esheldon

Thus the check if (slist->data != NULL) { is all that is needed, which ensures there is an array over which we can loop

esheldon avatar Sep 03 '25 16:09 esheldon