diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-06-26 15:11:57 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-06-26 15:11:57 +0000 |
commit | 20584158e3d7f6a012a677476ba36d1691c7aa66 (patch) | |
tree | 14e0ec30ae4790ffbbc083df8235591989322273 /src | |
parent | aa82dc64b397b6ca0d336d91638d4f4b849e3667 (diff) | |
download | libbu++-20584158e3d7f6a012a677476ba36d1691c7aa66.tar.gz libbu++-20584158e3d7f6a012a677476ba36d1691c7aa66.tar.bz2 libbu++-20584158e3d7f6a012a677476ba36d1691c7aa66.tar.xz libbu++-20584158e3d7f6a012a677476ba36d1691c7aa66.zip |
Corrected a memory leak in Bu::BZip2, it wasn't cleaning up the big buffer.
Diffstat (limited to '')
-rw-r--r-- | src/bzip2.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bzip2.cpp b/src/bzip2.cpp index 66786e4..fbe5712 100644 --- a/src/bzip2.cpp +++ b/src/bzip2.cpp | |||
@@ -33,6 +33,8 @@ size_t Bu::BZip2::stop() | |||
33 | if( bReading ) | 33 | if( bReading ) |
34 | { | 34 | { |
35 | BZ2_bzDecompressEnd( &bzState ); | 35 | BZ2_bzDecompressEnd( &bzState ); |
36 | delete[] pBuf; | ||
37 | pBuf = NULL; | ||
36 | return 0; | 38 | return 0; |
37 | } | 39 | } |
38 | else | 40 | else |
@@ -53,6 +55,8 @@ size_t Bu::BZip2::stop() | |||
53 | break; | 55 | break; |
54 | } | 56 | } |
55 | BZ2_bzCompressEnd( &bzState ); | 57 | BZ2_bzCompressEnd( &bzState ); |
58 | delete[] pBuf; | ||
59 | pBuf = NULL; | ||
56 | return sTotal; | 60 | return sTotal; |
57 | } | 61 | } |
58 | } | 62 | } |