aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-04-06 05:52:23 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-04-06 05:52:23 +0000
commit53e3c225ee6db5da29050568f5173a77d060efde (patch)
treed913111ea3d128a97a8c3256e6162861d0b3d680 /lib
parent50a53d4eecec60d348100e8506bd01fefd2b5f7f (diff)
curl_formfree() can be called with a NULL argument
Diffstat (limited to 'lib')
-rw-r--r--lib/formdata.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/formdata.c b/lib/formdata.c
index 14d911d35..cadccb802 100644
--- a/lib/formdata.c
+++ b/lib/formdata.c
@@ -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 */