mirror of
https://github.com/facebook/zstd.git
synced 2025-08-01 09:47:01 +03:00
fix memory leaks
This commit is contained in:
15
.travis.yml
15
.travis.yml
@ -8,14 +8,6 @@ matrix:
|
|||||||
|
|
||||||
|
|
||||||
# Container-based Ubuntu 12.04 LTS Server Edition 64 bit (doesn't support 32-bit includes)
|
# Container-based Ubuntu 12.04 LTS Server Edition 64 bit (doesn't support 32-bit includes)
|
||||||
- env: Ubu=12.04cont Cmd="make usan"
|
|
||||||
os: linux
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
- env: Ubu=12.04cont Cmd="make asan"
|
|
||||||
os: linux
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
- env: Ubu=12.04cont Cmd="make uasan"
|
- env: Ubu=12.04cont Cmd="make uasan"
|
||||||
os: linux
|
os: linux
|
||||||
sudo: false
|
sudo: false
|
||||||
@ -46,17 +38,12 @@ matrix:
|
|||||||
|
|
||||||
|
|
||||||
# Ubuntu 14.04 LTS Server Edition 64 bit
|
# Ubuntu 14.04 LTS Server Edition 64 bit
|
||||||
- env: Ubu=14.04 Cmd='cd contrib/pzstd && make googletest pzstd tests check && make clean
|
- env: Ubu=14.04 Cmd='cd contrib/pzstd && make test-pzstd && make test-pzstd32 && make test-pzstd-tsan && test-pzstd-asan'
|
||||||
&& make googletest32 all32 check && make clean
|
|
||||||
&& make googletest tsan check && make clean
|
|
||||||
&& make asan check && make clean'
|
|
||||||
os: linux
|
os: linux
|
||||||
dist: trusty
|
dist: trusty
|
||||||
sudo: required
|
sudo: required
|
||||||
install:
|
install:
|
||||||
- export CXX="g++-6" CC="gcc-6"
|
- export CXX="g++-6" CC="gcc-6"
|
||||||
- export LDFLAGS="-fuse-ld=gold"
|
|
||||||
- export TESTFLAGS='--gtest_filter=-*ExtremelyLarge*'
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
|
@ -85,6 +85,23 @@ endif
|
|||||||
.PHONY: default
|
.PHONY: default
|
||||||
default: all
|
default: all
|
||||||
|
|
||||||
|
.PHONY: test-pzstd
|
||||||
|
test-pzstd: TESTFLAGS='--gtest_filter=-*ExtremelyLarge*'
|
||||||
|
test-pzstd: clean googletest pzstd tests check
|
||||||
|
|
||||||
|
.PHONY: test-pzstd32
|
||||||
|
test-pzstd32: clean googletest32 all32 check
|
||||||
|
|
||||||
|
.PHONY: test-pzstd-tsan
|
||||||
|
test-pzstd-tsan: LDFLAGS="-fuse-ld=gold"
|
||||||
|
test-pzstd-tsan: TESTFLAGS='--gtest_filter=-*ExtremelyLarge*'
|
||||||
|
test-pzstd-tsan: clean googletest tsan check
|
||||||
|
|
||||||
|
.PHONY: test-pzstd-asan
|
||||||
|
test-pzstd-asan: LDFLAGS="-fuse-ld=gold"
|
||||||
|
test-pzstd-asan: TESTFLAGS='--gtest_filter=-*ExtremelyLarge*'
|
||||||
|
test-pzstd-asan: clean asan check
|
||||||
|
|
||||||
.PHONY: check
|
.PHONY: check
|
||||||
check:
|
check:
|
||||||
$(TESTPROG) ./utils/test/BufferTest$(EXT) $(TESTFLAGS)
|
$(TESTPROG) ./utils/test/BufferTest$(EXT) $(TESTFLAGS)
|
||||||
|
@ -399,7 +399,7 @@ int main(int argCount, const char* argv[])
|
|||||||
while (argument[0]!=0) {
|
while (argument[0]!=0) {
|
||||||
if (lastCommand) {
|
if (lastCommand) {
|
||||||
DISPLAY("error : command must be followed by argument \n");
|
DISPLAY("error : command must be followed by argument \n");
|
||||||
return 1;
|
CLEAN_RETURN(1);
|
||||||
}
|
}
|
||||||
#ifndef ZSTD_NOCOMPRESS
|
#ifndef ZSTD_NOCOMPRESS
|
||||||
/* compression Level */
|
/* compression Level */
|
||||||
@ -555,7 +555,7 @@ int main(int argCount, const char* argv[])
|
|||||||
filenameTable[filenameIdx++] = argument;
|
filenameTable[filenameIdx++] = argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lastCommand) { DISPLAY("error : command must be followed by argument \n"); return 1; } /* forgotten argument */
|
if (lastCommand) { DISPLAY("error : command must be followed by argument \n"); CLEAN_RETURN(1); } /* forgotten argument */
|
||||||
|
|
||||||
/* Welcome message (if verbose) */
|
/* Welcome message (if verbose) */
|
||||||
DISPLAYLEVEL(3, WELCOME_MESSAGE);
|
DISPLAYLEVEL(3, WELCOME_MESSAGE);
|
||||||
|
@ -496,6 +496,8 @@ static int basicUnitTests(U32 seed, double compressibility, ZSTD_customMem custo
|
|||||||
/* Bug will cause checksum to fail */
|
/* Bug will cause checksum to fail */
|
||||||
if (ZSTD_isError(r)) goto _output_error;
|
if (ZSTD_isError(r)) goto _output_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ZSTD_freeDStream(zds);
|
||||||
}
|
}
|
||||||
DISPLAYLEVEL(3, "OK \n");
|
DISPLAYLEVEL(3, "OK \n");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user