Skip to content

Commit 9c19cbc

Browse files
committed
...
1 parent cb58cb9 commit 9c19cbc

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

webserver/proxyclient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,8 @@ void CProxyManager::StartThread()
403403

404404
void CProxyManager::Stop()
405405
{
406-
io_service.stop();
407406
proxyclient->Stop();
407+
io_service.stop();
408408
_log.Log(LOG_ERROR, "PROXY: waiting for thread.join");
409409
m_thread->interrupt();
410410
m_thread->join();

webserver/proxycommon.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ CValueLengthPart::CValueLengthPart(ProxyPdu *pdu)
88
_ptr = _data = malloc(len);
99
if (_ptr == NULL) {
1010
_log.Log(LOG_ERROR, "CValueLengthPart (1): Could not allocate.");
11+
_len = 0;
12+
return;
1113
}
1214
memcpy(_data, pdu->content(), len);
1315
_len = len;
@@ -100,6 +102,7 @@ int CValueLengthPart::GetNextPart(void **data, size_t *length)
100102
(*data) = malloc(len);
101103
if ((*data) == NULL) {
102104
_log.Log(LOG_ERROR, "GetNextPart: Could not alloc.");
105+
return 0;
103106
}
104107
memcpy(*data, dataptr + SIZE_SIZE_T, len);
105108
*length = len;

0 commit comments

Comments
 (0)