Fix huge memory leak (16M per every hashed file).
Approved by: MAINTAINER
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= linuxdcpp
|
||||
PORTVERSION= 1.0.3
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= net-p2p
|
||||
MASTER_SITES= ${MASTER_SITE_LOCAL} http://freebsd.nsu.ru/distfiles/
|
||||
MASTER_SITE_SUBDIR= danfe
|
||||
|
||||
20
net-p2p/linuxdcpp/files/patch-client-HashManager.cpp
Normal file
20
net-p2p/linuxdcpp/files/patch-client-HashManager.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
--- client/HashManager.cpp.orig 2010-02-06 12:57:41.000000000 +0600
|
||||
+++ client/HashManager.cpp 2010-02-06 12:58:04.000000000 +0600
|
||||
@@ -636,13 +636,13 @@
|
||||
currentSize = max(static_cast<uint64_t>(currentSize - size_read), static_cast<uint64_t>(0));
|
||||
}
|
||||
|
||||
- if(size_left <= 0) {
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
munmap(buf, size_read);
|
||||
pos += size_read;
|
||||
size_left -= size_read;
|
||||
+
|
||||
+ if(size_left <= 0) {
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
close(fd);
|
||||
return true;
|
||||
Reference in New Issue
Block a user