Skip to content

Commit

Permalink
Stability fix
Browse files Browse the repository at this point in the history
  • Loading branch information
UldisRinkevichs committed Jul 21, 2023
1 parent 139af7c commit 188e63b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/ftpserv.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Created on: Aug 20, 2016
*
* Modified on: Jan 29, 2023
* Modified on: Jul 22, 2023
*
* Author: lightftp
*/
Expand Down Expand Up @@ -670,7 +670,7 @@ void *retr_thread(PTHCONTEXT tctx)

pthread_detach(pthread_self());
pthread_mutex_lock(&context->MTLock);
pthread_cleanup_push(cleanup_handler, context);
pthread_cleanup_push(cleanup_handler, tctx);

f = -1;
sent_ok = 0;
Expand All @@ -682,7 +682,7 @@ void *retr_thread(PTHCONTEXT tctx)
lt0 = t.tv_sec*1e9 + t.tv_nsec;
dtx = t.tv_sec+30;

buffer = malloc(TRANSMIT_BUFFER_SIZE);
buffer = x_malloc(TRANSMIT_BUFFER_SIZE);
while (buffer != NULL)
{
clientsocket = create_datasocket(context);
Expand Down Expand Up @@ -1108,7 +1108,7 @@ void *stor_thread(PTHCONTEXT tctx)
lt0 = t.tv_sec*1e9 + t.tv_nsec;
dtx = t.tv_sec+30;

buffer = malloc(TRANSMIT_BUFFER_SIZE);
buffer = x_malloc(TRANSMIT_BUFFER_SIZE);
while (buffer != NULL)
{
clientsocket = create_datasocket(context);
Expand Down

0 comments on commit 188e63b

Please sign in to comment.