Skip to content

Commit

Permalink
ogrlineref: fix double-free on 'ogrlineref --version'
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Dec 23, 2024
1 parent 1afb134 commit 8c7e9b9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions apps/ogrlineref.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@ MAIN_START(argc, argv)

argc = GDALGeneralCmdLineProcessor(argc, &argv, 0);

if (argc < 2)
if (argc < 1)
{
try
{
Expand All @@ -1406,7 +1406,6 @@ MAIN_START(argc, argv)
CPLError(CE_Failure, CPLE_AppDefined, "Unexpected exception: %s",
err.what());
}
CSLDestroy(argv);
exit(1);
}

Expand Down

0 comments on commit 8c7e9b9

Please sign in to comment.