|
static struct stringlist* stringlist_delete(struct stringlist* slist) { |
|
if (slist != NULL) { |
|
size_t i=0; |
|
if (slist->data != NULL) { |
|
for (i=0; i < slist->size; i++) { |
|
free(slist->data[i]); |
|
} |
|
} |
|
free(slist->data); |
|
free(slist); |
|
} |
|
return NULL; |
|
} |
Line 308, probably want to null check before attempting to free.
Also the free(slist->data); should be inside the conditional block.
fitsio/fitsio/fitsio_pywrap.c
Lines 303 to 315 in 9069725
Line 308, probably want to null check before attempting to free.
Also the
free(slist->data);should be inside the conditional block.