projects
/
ecparse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
87c3276
)
free buffers after parsing
author
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Sat, 5 Jul 2008 19:06:57 +0000
(21:06 +0200)
committer
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Sat, 5 Jul 2008 19:06:57 +0000
(21:06 +0200)
ED2KLink.cpp
patch
|
blob
|
history
diff --git
a/ED2KLink.cpp
b/ED2KLink.cpp
index
1a82066
..
e1ec2ff
100644
(file)
--- a/
ED2KLink.cpp
+++ b/
ED2KLink.cpp
@@
-90,6
+90,7
@@
ED2KLink* ED2KLink::parseED2KLink(const char* buffer) {
size = atol(sizeString);
GlobalSettings::isVerbose() && fprintf(stderr, "[%s:%d] parsed size “%s” into %d.\n", __FILE__, __LINE__, sizeString, size);
size = atol(sizeString);
GlobalSettings::isVerbose() && fprintf(stderr, "[%s:%d] parsed size “%s” into %d.\n", __FILE__, __LINE__, sizeString, size);
+ free(sizeString);
for (hashIndex = 0; hashIndex < 16; hashIndex++) {
char byteBuffer[3];
for (hashIndex = 0; hashIndex < 16; hashIndex++) {
char byteBuffer[3];
@@
-99,7
+100,9
@@
ED2KLink* ED2KLink::parseED2KLink(const char* buffer) {
GlobalSettings::isVerbose() && fprintf(stderr, "[%s:%d] parsed ‘%c%c’ as %02x.\n", __FILE__, __LINE__, *(byteBuffer), *(byteBuffer + 1), hash[hashIndex]);
}
GlobalSettings::isVerbose() && fprintf(stderr, "[%s:%d] parsed ‘%c%c’ as %02x.\n", __FILE__, __LINE__, *(byteBuffer), *(byteBuffer + 1), hash[hashIndex]);
}
- return new ED2KLink(filename, size, hash);
+ ED2KLink* ed2kLink = new ED2KLink(filename, size, hash);
+ free(filename);
+ return ed2kLink;
}
const char* ED2KLink::getLink() {
}
const char* ED2KLink::getLink() {