Merge pull request #900 from gaul/leak

Plug memory leak
This commit is contained in:
Takeshi Nakatani 2019-01-20 12:30:31 +09:00 committed by GitHub
commit 61dc7f0a70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3452,6 +3452,8 @@ int S3fsCurl::UploadMultipartPostSetup(const char* tpath, int part_num, const st
return -1;
}
requestHeaders = NULL;
// make md5 and file pointer
if(S3fsCurl::is_content_md5){
unsigned char *md5raw = s3fs_md5hexsum(partdata.fd, partdata.startpos, partdata.size);
@ -3481,7 +3483,6 @@ int S3fsCurl::UploadMultipartPostSetup(const char* tpath, int part_num, const st
turl += urlargs;
url = prepare_url(turl.c_str());
path = get_realpath(tpath);
requestHeaders = NULL;
bodydata = new BodyData();
headdata = new BodyData();
responseHeaders.clear();