Permalink
Browse files

unlink http symbol tmpfile on failed curl request

  • Loading branch information...
1 parent e498ec4 commit 98ad63290fef6fae3fff2433984109935ed63eb3 @tbonfort tbonfort committed Jul 31, 2013
Showing with 6 additions and 1 deletion.
  1. +5 −0 mapsymbol.c
  2. +1 −1 msautotest
View
@@ -378,6 +378,11 @@ int msAddImageSymbol(symbolSetObj *symbolset, char *filename)
if (msHTTPGetFile(filename, tmpfullfilename, &status, -1, bCheckLocalCache, 0, 1024*1024 /* 1 MegaByte */) == MS_SUCCESS) {
symbol->imagepath = msStrdup(tmpfullfilename);
symbol->full_pixmap_path = msStrdup(tmpfullfilename);
+ } else {
+ unlink(tmpfullfilename);
+ msFree(tmpfilename);
+ msFree(tmppath);
+ return MS_FAILURE;
}
}
msFree(tmpfilename);

0 comments on commit 98ad632

Please sign in to comment.