fitsio icon indicating copy to clipboard operation
fitsio copied to clipboard

Perform null check before free

Open petesmc opened this issue 4 months ago • 1 comments

https://github.com/esheldon/fitsio/blob/90697250a609cee86a9b3c4d9567bd0fa1da8260/fitsio/fitsio_pywrap.c#L303-L315

Line 308, probably want to null check before attempting to free.

Also the free(slist->data); should be inside the conditional block.

petesmc avatar Aug 10 '25 13:08 petesmc

free does nothing if the pointer is NULL

esheldon avatar Sep 03 '25 16:09 esheldon