Fix a use-after-free ASan spotted.
This commit is contained in:
parent
09067eecda
commit
06a14b4b27
1 changed files with 2 additions and 1 deletions
|
@ -2252,7 +2252,8 @@ NavDataCache::findAirportRunway(const std::string& aName)
|
||||||
|
|
||||||
AirportRunwayPair result;
|
AirportRunwayPair result;
|
||||||
sqlite_bind_stdstring(d->findAirportRunway, 1, parts[0]);
|
sqlite_bind_stdstring(d->findAirportRunway, 1, parts[0]);
|
||||||
sqlite_bind_stdstring(d->findAirportRunway, 2, cleanRunwayNo(parts[1]));
|
const auto cleanedRunway = cleanRunwayNo(parts[1]);
|
||||||
|
sqlite_bind_stdstring(d->findAirportRunway, 2, cleanedRunway);
|
||||||
|
|
||||||
if (d->execSelect(d->findAirportRunway)) {
|
if (d->execSelect(d->findAirportRunway)) {
|
||||||
result = AirportRunwayPair(sqlite3_column_int64(d->findAirportRunway, 0),
|
result = AirportRunwayPair(sqlite3_column_int64(d->findAirportRunway, 0),
|
||||||
|
|
Loading…
Reference in a new issue