mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
sspc: avoid dsh deref if stream instantiation failed
This commit is contained in:
parent
3fe08ce5d8
commit
10a6afdcd9
2 changed files with 8 additions and 2 deletions
|
@ -467,8 +467,12 @@ lws_dsh_free(void **pobj)
|
|||
int
|
||||
lws_dsh_get_head(lws_dsh_t *dsh, int kind, void **obj, size_t *size)
|
||||
{
|
||||
lws_dsh_obj_t *_obj = (lws_dsh_obj_t *)
|
||||
lws_dll2_get_head(&dsh->oha[kind + 1].owner);
|
||||
lws_dsh_obj_t *_obj;
|
||||
|
||||
if (!dsh)
|
||||
return 1;
|
||||
|
||||
_obj = (lws_dsh_obj_t *)lws_dll2_get_head(&dsh->oha[kind + 1].owner);
|
||||
|
||||
if (!_obj) {
|
||||
*obj = 0;
|
||||
|
|
|
@ -633,6 +633,8 @@ again:
|
|||
case LPCSPROX_REPORTING_FAIL:
|
||||
goto hangup;
|
||||
case LPCSPROX_OPERATIONAL:
|
||||
if (!conn)
|
||||
break;
|
||||
if (pay) {
|
||||
lws_dsh_free((void **)&p);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue