Dolda2000 GitWeb
/
doldaconnect.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8d7a1e8
)
Fixed a memory leak in the trpipe fitting.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 8 Jun 2008 17:11:30 +0000
(19:11 +0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 8 Jun 2008 17:11:30 +0000
(19:11 +0200)
daemon/transfer.c
patch
|
blob
|
blame
|
history
diff --git
a/daemon/transfer.c
b/daemon/transfer.c
index
f23a3ed
..
ee5f673
100644
(file)
--- 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);
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;
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);
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);
transfer->curpos += blen;
bytesdownload += blen;
CBCHAINDOCB(transfer, trans_p, transfer);