Skip to content

Commit 11c4979

Browse files
authored
Merge pull request #114 from lunixoid/master
Static analyser issues
2 parents 56203f1 + c32ad54 commit 11c4979

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/curl_form.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ void curl_form::add(const curl_pair<CURLformoption,string> &form_name, const cur
121121
void curl_form::add(const curl_pair<CURLformoption,string> &form_name, const vector<string> &files) {
122122
const size_t size = files.size();
123123
struct curl_forms *new_files;
124-
this->is_null(new_files = (struct curl_forms *)calloc(size,sizeof(struct curl_forms)));
124+
this->is_null(new_files = new struct curl_forms[size]);
125125
if (new_files == nullptr) {
126126
throw bad_alloc();
127127
}

0 commit comments

Comments
 (0)