Skip to content

Commit

Permalink
loadSymbol(): fix potential memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault authored and github-actions[bot] committed Oct 10, 2022
1 parent 14574d6 commit c2311a0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mapsymbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,10 @@ int loadSymbol(symbolObj *s, char *symbolpath)
msSetError(MS_TYPEERR, "Parsing error near (%s):(line %d)", "loadSymbol()", msyystring_buffer, msyylineno);
return(-1);
}
msFree(s->full_pixmap_path);
s->full_pixmap_path = msStrdup(msBuildPath(szPath, symbolpath, msyystring_buffer));
/* Set imagepath */
msFree(s->imagepath);
s->imagepath = msStrdup(msyystring_buffer);
break;
case(NAME):
Expand Down

0 comments on commit c2311a0

Please sign in to comment.