Skip to content

Commit

Permalink
TABSeamless::OpenForRead(): avoid potential double-free
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed May 29, 2024
1 parent 422a01e commit 2f8dc88
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ogr/ogrsf_frmts/mitab/mitab_tabseamless.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ int TABSeamless::OpenForRead(const char *pszFname,
}

CPLFree(m_pszFname);
m_pszFname = nullptr;
CSLDestroy(papszTABFile);
return -1;
}
Expand Down Expand Up @@ -216,6 +217,7 @@ int TABSeamless::OpenForRead(const char *pszFname,
CPLErrorReset();

CPLFree(m_pszFname);
m_pszFname = nullptr;

return -1;
}
Expand Down

0 comments on commit 2f8dc88

Please sign in to comment.