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