Skip to content

Commit e4f4aa2

Browse files
committed
cov482759: if pss may be NULL, require it
1 parent 1d80ad0 commit e4f4aa2

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

minimal-examples/ssproxy/ssproxy-custom-transport-uart/transport-serial.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,19 +169,20 @@ cb_proxy_serial_transport(struct lws *wsi, enum lws_callback_reasons reason,
169169
case LWS_CALLBACK_RAW_CLOSE_FILE:
170170
lwsl_notice("LWS_CALLBACK_RAW_CLOSE_FILE\n");
171171

172-
if (pss)
172+
if (pss) {
173173
assert_is_pss(pss);
174174

175-
lws_set_opaque_user_data(wsi, NULL);
176-
/*
177-
* We also have to eliminate the pss reference in
178-
* tm->info.txp_ppath.priv_onw
179-
*/
175+
lws_set_opaque_user_data(wsi, NULL);
176+
/*
177+
* We also have to eliminate the pss reference in
178+
* tm->info.txp_ppath.priv_onw
179+
*/
180180

181181
((lws_transport_mux_t *)pss->txp_ppath.priv_in)->
182182
info.txp_ppath.priv_onw = NULL;
183183

184-
free(pss);
184+
free(pss);
185+
}
185186
break;
186187

187188
case LWS_CALLBACK_RAW_WRITEABLE_FILE:

0 commit comments

Comments
 (0)