Avoid NULL dereference in free()
Former-commit-id: d257e5a0bfde5c4f6a6d7380eace24feba518b06
This commit is contained in:
parent
8afa775428
commit
f785c7de29
|
@ -485,6 +485,7 @@ qpms_scatsys_t *qpms_scatsys_apply_symmetry(const qpms_scatsys_t *orig, const qp
|
|||
|
||||
|
||||
void qpms_scatsys_free(qpms_scatsys_t *ss) {
|
||||
if(ss) {
|
||||
free(ss->tm);
|
||||
free(ss->p);
|
||||
free(ss->fecv_pstarts);
|
||||
|
@ -493,6 +494,7 @@ void qpms_scatsys_free(qpms_scatsys_t *ss) {
|
|||
free(ss->otspace);
|
||||
free(ss->p_orbitinfo);
|
||||
free(ss->orbit_types);
|
||||
}
|
||||
free(ss);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue