Skip to content

Commit 752bdf9

Browse files
committed
Error when chunk is not found during chunk tuple routing
Fix potential null pointer deference found by coverity. This is a false positive as pre checks for chunk tuple routing ensure either the hypertable lookup or chunk succeed. Nevertheless it's still useful to be explicit in the function call looking up the chunk.
1 parent 671e61e commit 752bdf9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/chunk_tuple_routing.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ ts_chunk_tuple_routing_create(EState *estate, ResultRelInfo *rri)
4545
*/
4646
if (!ctr->hypertable)
4747
{
48-
Chunk *chunk = ts_chunk_get_by_relid(RelationGetRelid(rri->ri_RelationDesc), false);
48+
Chunk *chunk = ts_chunk_get_by_relid(RelationGetRelid(rri->ri_RelationDesc), true);
4949
ctr->hypertable = ts_hypertable_cache_get_entry(ctr->hypertable_cache,
5050
chunk->hypertable_relid,
5151
CACHE_FLAG_NONE);

0 commit comments

Comments
 (0)