Skip to content

Commit

Permalink
Fix coverity warning about NULL pointer dereference
Browse files Browse the repository at this point in the history
In current code skip_current_tuple will never be NULL pointer
in ON CONFLICT DO NOTHING case but add an additional check nonetheless
to make it safe against future refactoring.
  • Loading branch information
svenklemm committed Jul 17, 2024
1 parent a0638f5 commit 640cb37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tsl/src/compression/compression_dml.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ batch_matches(RowDecompressor *decompressor, ScanKeyData *scankeys, int num_scan

));
}
if (constraints->on_conflict == ONCONFLICT_NOTHING)
if (constraints->on_conflict == ONCONFLICT_NOTHING && skip_current_tuple)
{
*skip_current_tuple = true;
}
Expand Down

0 comments on commit 640cb37

Please sign in to comment.