Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
HAWQ-1808. fix access null pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
ztao1987 committed Sep 22, 2021
1 parent 7a55874 commit 750a601
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
5 changes: 1 addition & 4 deletions src/backend/cdb/executormgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,7 @@ executormgr_cancel(QueryExecutor *executor)

success = (PQcancel(cn, errbuf, sizeof(errbuf)) != 0);
if(!success){
write_log("executormgr_cancel cancel (seg%d %s:%d) failed",
executor->desc->segment->segindex,
executor->desc->segment->hostname,
executor->desc->segment->port);
write_log("executormgr_cancel cancel failed, %s.", errbuf);
}

#if 0
Expand Down
10 changes: 2 additions & 8 deletions src/backend/cdb/executormgr_new.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,7 @@ bool executormgr_main_cancel(struct MyQueryExecutor *qe) {
MemSet(errbuf, 0, sizeof(errbuf));
bool success = (PQcancel(cn, errbuf, sizeof(errbuf)) != 0);
if(!success){
write_log("executormgr_cancel cancel (seg%d %s:%d) failed",
qe->desc->segment->segindex,
qe->desc->segment->hostname,
qe->desc->segment->port);
write_log("executormgr_main_cancel cancel failed, %s.", errbuf);
}
PQfreeCancel(cn);

Expand All @@ -492,10 +489,7 @@ bool executormgr_proxy_cancel(struct MyQueryExecutor *qe, bool cancelRequest) {
MemSet(errbuf, 0, sizeof(errbuf));
success = (PQcancel(cn, errbuf, sizeof(errbuf)) != 0);
if(!success){
write_log("executormgr_cancel cancel (seg%d %s:%d) failed",
qe->desc->segment->segindex,
qe->desc->segment->hostname,
qe->desc->segment->port);
write_log("executormgr_proxy_cancel cancel failed, %s.", errbuf);
}
PQfreeCancel(cn);
}
Expand Down

0 comments on commit 750a601

Please sign in to comment.