File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.296 2010/01/05 01:06:56 tgl Exp $
11
+ * $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.297 2010/01/07 20:39:45 rhaas Exp $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -404,7 +404,12 @@ RelationParseRelOptions(Relation relation, HeapTuple tuple)
404
404
relation -> rd_rel -> relkind == RELKIND_INDEX ?
405
405
relation -> rd_am -> amoptions : InvalidOid );
406
406
407
- /* Copy parsed data into CacheMemoryContext */
407
+ /*
408
+ * Copy parsed data into CacheMemoryContext. To guard against the
409
+ * possibility of leaks in the reloptions code, we want to do the actual
410
+ * parsing in the caller's memory context and copy the results into
411
+ * CacheMemoryContext after the fact.
412
+ */
408
413
if (options )
409
414
{
410
415
relation -> rd_options = MemoryContextAlloc (CacheMemoryContext ,
You can’t perform that action at this time.
0 commit comments