Free all allocated space
authorJoey Schulze <joey@infodrom.org>
Sun, 2 Dec 2007 22:23:47 +0000 (22:23 +0000)
committerJoey Schulze <joey@infodrom.org>
Sun, 2 Dec 2007 22:23:47 +0000 (22:23 +0000)
cgi.c

diff --git a/cgi.c b/cgi.c
index dd498aa..8703f04 100644 (file)
--- a/cgi.c
+++ b/cgi.c
@@ -188,6 +188,7 @@ s_cgi *cgiReadMultipart (char *boundary)
                    if (!result) {
                        len = MULTIPART_DELTA * sizeof (s_var *);
                        if ((result = (s_var **)malloc (len)) == NULL) {
+                           free (name);
                            if (type)
                                free (type);
                            return NULL;