Skip to content

Commit

Permalink
msConnectLayer(): fix potential double-free introduced by recent ossf…
Browse files Browse the repository at this point in the history
…uzz fix (Coverity Scan 1526531)
  • Loading branch information
rouault committed Oct 23, 2022
1 parent 46e346b commit 0454c14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions maplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2110,10 +2110,10 @@ int msConnectLayer(layerObj *layer,
/* For internal types, library_str is ignored */
if (connectiontype == MS_PLUGIN) {
int rv;
msFree(layer->plugin_library);
msFree(layer->plugin_library_original);

msFree(layer->plugin_library_original);
layer->plugin_library_original = msStrdup(library_str);

rv = msBuildPluginLibraryPath(&layer->plugin_library,
layer->plugin_library_original,
layer->map);
Expand Down

0 comments on commit 0454c14

Please sign in to comment.