Index: mapcopy.c =================================================================== RCS file: /data2/cvsroot/mapserver/mapcopy.c,v retrieving revision 1.24 diff -u -r1.24 mapcopy.c --- mapcopy.c 29 Apr 2004 17:29:44 -0000 1.24 +++ mapcopy.c 29 May 2004 18:31:13 -0000 @@ -104,7 +104,7 @@ #ifdef USE_PROJ copyProperty(&(dst->numargs), &(src->numargs), sizeof(int)); for (i = 0; i < dst->numargs; i++) { - dst->args[i] = strdup(src->args[i]); + copyStringPropertyRealloc(&(dst->args[i]), src->args[i]); } if (dst->numargs != 0) if (msProcessProjection(dst) != MS_SUCCESS) return(MS_FAILURE); @@ -396,19 +396,19 @@ **********************************************************************/ int msCopyWeb(webObj *dst, webObj *src, mapObj *map) { - copyStringProperty(&(dst->log), src->log); - copyStringProperty(&(dst->imagepath), src->imagepath); - copyStringProperty(&(dst->imageurl), src->imageurl); + copyStringPropertyRealloc(&(dst->log), src->log); + copyStringPropertyRealloc(&(dst->imagepath), src->imagepath); + copyStringPropertyRealloc(&(dst->imageurl), src->imageurl); copyProperty(&(dst->map), &map, sizeof(mapObj *)); #ifndef __cplusplus - copyStringProperty(&(dst->template), src->template); + copyStringPropertyRealloc(&(dst->template), src->template); #else - copyStringProperty(&(dst->_template), src->_template); + copyStringPropertyRealloc(&(dst->_template), src->_template); #endif - copyStringProperty(&(dst->header), src->header); - copyStringProperty(&(dst->footer), src->footer); - copyStringProperty(&(dst->empty), src->empty); - copyStringProperty(&(dst->error), src->error); + copyStringPropertyRealloc(&(dst->header), src->header); + copyStringPropertyRealloc(&(dst->footer), src->footer); + copyStringPropertyRealloc(&(dst->empty), src->empty); + copyStringPropertyRealloc(&(dst->error), src->error); if (msCopyRect(&(dst->extent), &(src->extent)) == MS_FAILURE) { msSetError(MS_MEMERR, "Failed to copy extent.", "msCopyWeb()"); @@ -417,8 +417,8 @@ copyProperty(&(dst->minscale), &(src->minscale), sizeof(double)); copyProperty(&(dst->maxscale), &(src->maxscale), sizeof(double)); - copyStringProperty(&(dst->mintemplate), src->mintemplate); - copyStringProperty(&(dst->maxtemplate), src->maxtemplate); + copyStringPropertyRealloc(&(dst->mintemplate), src->mintemplate); + copyStringPropertyRealloc(&(dst->maxtemplate), src->maxtemplate); if (src->metadata) { @@ -450,7 +450,7 @@ if (return_value != MS_SUCCESS) return(MS_FAILURE); copyProperty(&(dst->symbol), &(src->symbol), sizeof(int)); - copyStringProperty(&(dst->symbolname), src->symbolname); + copyStringPropertyRealloc(&(dst->symbolname), src->symbolname); copyProperty(&(dst->size), &(src->size), sizeof(int)); copyProperty(&(dst->sizescaled), &(src->sizescaled), sizeof(int)); copyProperty(&(dst->minsize), &(src->minsize), sizeof(int)); @@ -496,9 +496,9 @@ return(MS_FAILURE); } - copyStringProperty(&(dst->keyimage), src->keyimage); - copyStringProperty(&(dst->name), src->name); - copyStringProperty(&(dst->title), src->title); + copyStringPropertyRealloc(&(dst->keyimage), src->keyimage); + copyStringPropertyRealloc(&(dst->name), src->name); + copyStringPropertyRealloc(&(dst->title), src->title); if (msCopyExpression(&(dst->text), &(src->text)) != MS_SUCCESS) { msSetError(MS_MEMERR, "Failed to copy text.", "msCopyClass()"); @@ -506,9 +506,9 @@ } #ifndef __cplusplus - copyStringProperty(&(dst->template), src->template); + copyStringPropertyRealloc(&(dst->template), src->template); #else - copyStringProperty(&(dst->_template), src->_template); + copyStringPropertyRealloc(&(dst->_template), src->_template); #endif copyProperty(&(dst->type), &(src->type), sizeof(int));