projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50a53d4
)
curl_formfree() can be called with a NULL argument
author
Daniel Stenberg
<daniel@haxx.se>
Fri, 6 Apr 2001 05:52:23 +0000
(
05:52
+0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Fri, 6 Apr 2001 05:52:23 +0000
(
05:52
+0000)
lib/formdata.c
patch
|
blob
|
history
diff --git
a/lib/formdata.c
b/lib/formdata.c
index
14d911d
..
cadccb8
100644
(file)
--- 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 */