Index: url.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/url.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -r1.141 -r1.142
--- url.c	2001/08/22 11:24:57	1.141
+++ url.c	2001/08/23 14:06:38	1.142
@@ -582,6 +581,11 @@
     /*
      * The URL to fetch.
      */
+    if(data->bits.urlstringalloc) {
+      /* the already set URL is allocated, free it first! */
+      free(data->url);
+      data->bits.urlstringalloc=FALSE;
+    }
     data->url = va_arg(param, char *);
     break;
   case CURLOPT_PORT:
@@ -628,6 +632,13 @@
     /*
      * Set proxy server:port to use as HTTP proxy
      */
+    if(data->bits.proxystringalloc) {
+      /*
+       * The already set string is allocated, free that first
+       */
+      data->bits.proxystringalloc=FALSE;;
+      free(data->proxy);
+    }
     data->proxy = va_arg(param, char *);
     data->bits.httpproxy = data->proxy?1:0;
     break;
