Skip to content

Commit

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

CPLFree(m_pszFname);
m_pszFname = nullptr;
return -1;
}

Expand Down Expand Up @@ -219,6 +220,7 @@ int TABView::OpenForRead(const char *pszFname,
CPLErrorReset();

CPLFree(m_pszFname);
m_pszFname = nullptr;

return -1;
}
Expand Down

0 comments on commit bf0c17d

Please sign in to comment.