Commit f8210ef
authored
Fix
stop_postmaster accepts single boolean arg, yet pointer of type ClusterInfo is passed. Remove this, and call stop_postmaster with `false` argument, resulting in smart (not fast) shutdown. Also remove redundant return at the end on void function.
Introduced as oversight in e20a488.
Fixed with help of coverity report:
```
** CID 640088: Null pointer dereferences (REVERSE_INULL)
/src/bin/pg_upgrade/pg_upgrade.c: 374 in get_cluster_version()
_____________________________________________________________________________________________
*** CID 640088: Null pointer dereferences (REVERSE_INULL)
/src/bin/pg_upgrade/pg_upgrade.c: 374 in get_cluster_version()
368 cluster->dbid = dbid;
369
370 PQclear(res);
371
372 PQfinish(conn);
373
>>> CID 640088: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "cluster" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
374 stop_postmaster(cluster);
375
376 return;
377 }
378
379 #ifdef WIN32
```stop_postmaster call in get_cluster_version. (#1497)1 parent 897c057 commit f8210ef
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
375 | | - | |
376 | | - | |
| 374 | + | |
377 | 375 | | |
378 | 376 | | |
379 | 377 | | |
| |||
0 commit comments