From: Fredrik Tolf Date: Sun, 8 Jun 2008 17:11:30 +0000 (+0200) Subject: Fixed a memory leak in the trpipe fitting. X-Git-Tag: 1.3~14 X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=6bd790e0e2fff47c3bae8713060e037ec5fa58e5;p=doldaconnect.git Fixed a memory leak in the trpipe fitting. --- diff --git a/daemon/transfer.c b/daemon/transfer.c index f23a3ed..ee5f673 100644 --- a/daemon/transfer.c +++ b/daemon/transfer.c @@ -134,6 +134,7 @@ static void localread(struct socket *sk, struct transfer *transfer) if((transfer->datapipe != NULL) && (sockqueueleft(transfer->datapipe) > 0)) { buf = sockgetinbuf(sk, &blen); sockqueue(transfer->datapipe, buf, blen); + free(buf); time(&transfer->activity); transfer->curpos += blen; bytesupload += blen; @@ -149,6 +150,7 @@ static void dataread(struct socket *sk, struct transfer *transfer) if((transfer->localend != NULL) && (sockqueueleft(transfer->localend) > 0)) { buf = sockgetinbuf(sk, &blen); sockqueue(transfer->localend, buf, blen); + free(buf); transfer->curpos += blen; bytesdownload += blen; CBCHAINDOCB(transfer, trans_p, transfer);