sptps_stop(): clear pointers after free to avoid double free.
sptps_stop() may get called twice on some failed connection setups.
This commit is contained in:
parent
1d9dacb1f2
commit
a5bb6d40fb
1 changed files with 5 additions and 0 deletions
|
@ -576,9 +576,14 @@ bool sptps_stop(sptps_t *s) {
|
|||
// Clean up any resources.
|
||||
ecdh_free(&s->ecdh);
|
||||
free(s->inbuf);
|
||||
s->inbuf = NULL;
|
||||
free(s->mykex);
|
||||
s->mykex = NULL;
|
||||
free(s->hiskex);
|
||||
s->hiskex = NULL;
|
||||
free(s->key);
|
||||
s->key = NULL;
|
||||
free(s->label);
|
||||
s->label = NULL;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue