Commit ccdcdb2a authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

mark a value as alloced when strdup()ed to prevent memory leaks

parent b121e41e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -492,8 +492,10 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
          current_form->value = strdup(filename);
          if(!current_form->value)
            return_value = CURL_FORMADD_MEMORY;
          else
          else {
            current_form->flags |= HTTPPOST_READFILE;
            current_form->value_alloc = TRUE;
          }
        }
        else
          return_value = CURL_FORMADD_NULL;