dect
/
libdect
Archived
13
0
Fork 0

lce: fix segfault when closing S-SAP socket in PP mode

The socket is NULL in PP mode, don't try to close it.

Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
Patrick McHardy 2010-08-02 04:53:35 +02:00
parent d74420ac6e
commit 81bc245c85
1 changed files with 4 additions and 2 deletions

View File

@ -1283,8 +1283,10 @@ void dect_lce_exit(struct dect_handle *dh)
list_for_each_entry_safe(ddl, next, &dh->links, list)
dect_ddl_shutdown(dh, ddl);
dect_unregister_fd(dh, dh->s_sap);
dect_close(dh, dh->s_sap);
if (dh->mode == DECT_MODE_FP) {
dect_unregister_fd(dh, dh->s_sap);
dect_close(dh, dh->s_sap);
}
dect_unregister_fd(dh, dh->b_sap);
dect_close(dh, dh->b_sap);