aboutsummaryrefslogtreecommitdiff
path: root/src/examples/websocket_threaded_example.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/websocket_threaded_example.c')
-rw-r--r--src/examples/websocket_threaded_example.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/examples/websocket_threaded_example.c b/src/examples/websocket_threaded_example.c
index 2c1f31b3..1f4db5b8 100644
--- a/src/examples/websocket_threaded_example.c
+++ b/src/examples/websocket_threaded_example.c
@@ -714,16 +714,16 @@ run_usock (void *cls)
714 size = sprintf (client, "User#%d: ", (int)ws->sock); 714 size = sprintf (client, "User#%d: ", (int)ws->sock);
715 size += got; 715 size += got;
716 text = malloc (size); 716 text = malloc (size);
717 if (NULL != buf) 717 if (NULL != text)
718 { 718 {
719 sprintf (text, "%s%s", client, msg); 719 sprintf (text, "%s%s", client, msg);
720 sent = ws_send_frame (ws->sock, text, size); 720 sent = ws_send_frame (ws->sock, text, size);
721 free (text);
721 } 722 }
722 else 723 else
723 { 724 {
724 sent = -1; 725 sent = -1;
725 } 726 }
726 free (text);
727 free (msg); 727 free (msg);
728 if (-1 == sent) 728 if (-1 == sent)
729 { 729 {