Support cloning rawfile data

This commit is contained in:
Daniel Silverstone 2014-01-04 21:49:03 +00:00
parent de42f8880e
commit 33f94c265e

View File

@ -639,6 +639,21 @@ struct fetch_multipart_data *fetch_multipart_data_clone(
return NULL; return NULL;
} }
if (clone->file) {
clone->rawfile = strdup(list->rawfile);
if (clone->rawfile == NULL) {
free(clone->value);
free(clone->name);
free(clone);
if (result != NULL)
fetch_multipart_data_destroy(result);
return NULL;
}
} else {
clone->rawfile = NULL;
}
clone->next = NULL; clone->next = NULL;
if (result == NULL) if (result == NULL)