mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
curl_formfree() can be called with a NULL argument
This commit is contained in:
parent
50a53d4eec
commit
53e3c225ee
@ -371,6 +371,7 @@ char *Curl_FormBoundary(void)
|
||||
void Curl_FormFree(struct FormData *form)
|
||||
{
|
||||
struct FormData *next;
|
||||
|
||||
do {
|
||||
next=form->next; /* the following form line */
|
||||
free(form->line); /* free the line */
|
||||
@ -383,6 +384,11 @@ void Curl_FormFree(struct FormData *form)
|
||||
void curl_formfree(struct HttpPost *form)
|
||||
{
|
||||
struct HttpPost *next;
|
||||
|
||||
if(!form)
|
||||
/* no form to free, just get out of this */
|
||||
return;
|
||||
|
||||
do {
|
||||
next=form->next; /* the following form line */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user