Content-Length: 281338 | pFad | http://github.com/postgrespro/postgres/commit/8082bea2b06eb6bcd6cce4cc7801094c17045b4f

9C Fix use-after-free bug · postgrespro/postgres@8082bea · GitHub
Skip to content

Commit 8082bea

Browse files
committed
Fix use-after-free bug
Detected by buildfarm member prion
1 parent 3428ef7 commit 8082bea

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/backend/commands/statscmds.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,12 @@ CreateStatistics(CreateStatsStmt *stmt)
230230
statoid = HeapTupleGetOid(htup);
231231
heap_freetuple(htup);
232232
heap_close(statrel, RowExclusiveLock);
233+
234+
/*
235+
* Invalidate relcache so that others see the new statistics.
236+
*/
237+
CacheInvalidateRelcache(rel);
238+
233239
relation_close(rel, NoLock);
234240

235241
/*
@@ -250,11 +256,6 @@ CreateStatistics(CreateStatsStmt *stmt)
250256

251257
ObjectAddressSet(address, StatisticExtRelationId, statoid);
252258

253-
/*
254-
* Invalidate relcache so that others see the new statistics.
255-
*/
256-
CacheInvalidateRelcache(rel);
257-
258259
return address;
259260
}
260261

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/8082bea2b06eb6bcd6cce4cc7801094c17045b4f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy