Index: /asp3_tinet_ecnl_arm/trunk/ntshell/src/socket_stub.c
===================================================================
--- /asp3_tinet_ecnl_arm/trunk/ntshell/src/socket_stub.c	(revision 400)
+++ /asp3_tinet_ecnl_arm/trunk/ntshell/src/socket_stub.c	(revision 401)
@@ -33,5 +33,5 @@
  *  の責任を負わない．
  * 
- *  @(#) $Id$
+ *  @(#) $Id: socket_stub.c 1982 2019-07-18 00:13:56Z coas-nagasima $
  */
 #include "shellif.h"
@@ -372,4 +372,7 @@
 			ret = tcp_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp_cepid_table, tcp_cepid_table_count, cepid);
 				return -ENOMEM;
@@ -419,4 +422,7 @@
 			ret = tcp6_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp6_cepid_table, tcp6_cepid_table_count, cepid);
 				return -ENOMEM;
@@ -531,4 +537,7 @@
 			ret = tcp_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp_cepid_table, tcp_cepid_table_count, cepid);
 				return -ENOMEM;
@@ -569,4 +578,7 @@
 			ret = tcp6_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp6_cepid_table, tcp6_cepid_table_count, cepid);
 				return -ENOMEM;
@@ -638,4 +650,7 @@
 			ret = tcp_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp_cepid_table, tcp_cepid_table_count, cepid);
 				return -ENOMEM;
@@ -693,4 +708,7 @@
 			ret = tcp6_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp6_cepid_table, tcp6_cepid_table_count, cepid);
 				return -ENOMEM;
Index: /asp3_tinet_ecnl_rx/trunk/ntshell/src/socket_stub.c
===================================================================
--- /asp3_tinet_ecnl_rx/trunk/ntshell/src/socket_stub.c	(revision 400)
+++ /asp3_tinet_ecnl_rx/trunk/ntshell/src/socket_stub.c	(revision 401)
@@ -33,5 +33,5 @@
  *  の責任を負わない．
  * 
- *  @(#) $Id$
+ *  @(#) $Id: socket_stub.c 1982 2019-07-18 00:13:56Z coas-nagasima $
  */
 #include "shellif.h"
@@ -372,4 +372,7 @@
 			ret = tcp_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp_cepid_table, tcp_cepid_table_count, cepid);
 				return -ENOMEM;
@@ -419,4 +422,7 @@
 			ret = tcp6_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp6_cepid_table, tcp6_cepid_table_count, cepid);
 				return -ENOMEM;
@@ -531,4 +537,7 @@
 			ret = tcp_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp_cepid_table, tcp_cepid_table_count, cepid);
 				return -ENOMEM;
@@ -569,4 +578,7 @@
 			ret = tcp6_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp6_cepid_table, tcp6_cepid_table_count, cepid);
 				return -ENOMEM;
@@ -638,4 +650,7 @@
 			ret = tcp_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp_cepid_table, tcp_cepid_table_count, cepid);
 				return -ENOMEM;
@@ -693,4 +708,7 @@
 			ret = tcp6_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp6_cepid_table, tcp6_cepid_table_count, cepid);
 				return -ENOMEM;
Index: /azure_iot_hub/trunk/ntshell/src/socket_stub.c
===================================================================
--- /azure_iot_hub/trunk/ntshell/src/socket_stub.c	(revision 400)
+++ /azure_iot_hub/trunk/ntshell/src/socket_stub.c	(revision 401)
@@ -33,5 +33,5 @@
  *  の責任を負わない．
  * 
- *  @(#) $Id$
+ *  @(#) $Id: socket_stub.c 1982 2019-07-18 00:13:56Z coas-nagasima $
  */
 #include "shellif.h"
@@ -372,4 +372,7 @@
 			ret = tcp_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp_cepid_table, tcp_cepid_table_count, cepid);
 				return -ENOMEM;
@@ -419,4 +422,7 @@
 			ret = tcp6_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp6_cepid_table, tcp6_cepid_table_count, cepid);
 				return -ENOMEM;
@@ -531,4 +537,7 @@
 			ret = tcp_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp_cepid_table, tcp_cepid_table_count, cepid);
 				return -ENOMEM;
@@ -569,4 +578,7 @@
 			ret = tcp6_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp6_cepid_table, tcp6_cepid_table_count, cepid);
 				return -ENOMEM;
@@ -638,4 +650,7 @@
 			ret = tcp_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp_cepid_table, tcp_cepid_table_count, cepid);
 				return -ENOMEM;
@@ -693,4 +708,7 @@
 			ret = tcp6_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp6_cepid_table, tcp6_cepid_table_count, cepid);
 				return -ENOMEM;
Index: /azure_iot_hub_mbedtls/trunk/ntshell/src/socket_stub.c
===================================================================
--- /azure_iot_hub_mbedtls/trunk/ntshell/src/socket_stub.c	(revision 400)
+++ /azure_iot_hub_mbedtls/trunk/ntshell/src/socket_stub.c	(revision 401)
@@ -33,5 +33,5 @@
  *  の責任を負わない．
  * 
- *  @(#) $Id$
+ *  @(#) $Id: socket_stub.c 1982 2019-07-18 00:13:56Z coas-nagasima $
  */
 #include "shellif.h"
@@ -372,4 +372,7 @@
 			ret = tcp_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp_cepid_table, tcp_cepid_table_count, cepid);
 				return -ENOMEM;
@@ -419,4 +422,7 @@
 			ret = tcp6_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp6_cepid_table, tcp6_cepid_table_count, cepid);
 				return -ENOMEM;
@@ -531,4 +537,7 @@
 			ret = tcp_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp_cepid_table, tcp_cepid_table_count, cepid);
 				return -ENOMEM;
@@ -569,4 +578,7 @@
 			ret = tcp6_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp6_cepid_table, tcp6_cepid_table_count, cepid);
 				return -ENOMEM;
@@ -638,4 +650,7 @@
 			ret = tcp_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp_cepid_table, tcp_cepid_table_count, cepid);
 				return -ENOMEM;
@@ -693,4 +708,7 @@
 			ret = tcp6_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
+				free(socket->buf);
+				socket->buf = NULL;
+				socket->buf_size = 0;
 				delete_id(tcp6_cepid_table, tcp6_cepid_table_count, cepid);
 				return -ENOMEM;
