Page MenuHomeFreeBSD

D11150.id29474.diff
No OneTemporary

D11150.id29474.diff

Index: usr.sbin/bhyve/rfb.c
===================================================================
--- usr.sbin/bhyve/rfb.c
+++ usr.sbin/bhyve/rfb.c
@@ -765,7 +765,8 @@
int i;
#endif
- pthread_t tid;
+ pthread_t tid = 0;
+ int error = 0;
uint32_t sres;
int len;
@@ -877,8 +878,9 @@
rfb_send_screen(rc, cfd, 1);
- pthread_create(&tid, NULL, rfb_wr_thr, rc);
- pthread_set_name_np(tid, "rfbout");
+ error = pthread_create(&tid, NULL, rfb_wr_thr, rc);
+ if (error == 0)
+ pthread_set_name_np(tid, "rfbout");
/* Now read in client requests. 1st byte identifies type */
for (;;) {
@@ -914,7 +916,8 @@
}
done:
rc->cfd = -1;
- pthread_join(tid, NULL);
+ if (error == 0)
+ pthread_join(tid, NULL);
if (rc->enc_zlib_ok)
deflateEnd(&rc->zstream);
}

File Metadata

Mime Type
text/plain
Expires
Wed, Feb 4, 1:23 AM (16 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28428903
Default Alt Text
D11150.id29474.diff (779 B)

Event Timeline