OSDN Git Service
(root)
/
pgstoreplans
/
pg_store_plans.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b519030
)
Avoid use of uninitialized variables
author
Kyotaro Horiguchi
<horikyota.ntt@gmail.com>
Tue, 30 Nov 2021 06:38:45 +0000
(15:38 +0900)
committer
Kyotaro Horiguchi
<horikyota.ntt@gmail.com>
Mon, 17 Jan 2022 02:47:36 +0000
(11:47 +0900)
Some variables may be used uninitialized. Fix that.
pg_store_plans.c
patch
|
blob
|
history
diff --git
a/pg_store_plans.c
b/pg_store_plans.c
index
cfc2578
..
343f317
100644
(file)
--- a/
pg_store_plans.c
+++ b/
pg_store_plans.c
@@
-578,7
+578,7
@@
pgsp_shmem_startup(void)
{
bool found;
HASHCTL info;
- FILE *file;
+ FILE *file
= NULL
;
FILE *pfile = NULL;
uint32 header;
int32 num;
@@
-1512,6
+1512,7
@@
pg_store_plans_internal(FunctionCallInfo fcinfo,
mstr = pgsp_json_xmlize(pstr);
break;
default:
+ mstr = pstr;
break;
}
@@
-1746,6
+1747,9
@@
entry_dealloc(void)
entries = palloc(hash_get_num_entries(hash_table) * sizeof(pgspEntry *));
i = 0;
+ tottextlen = 0;
+ nvalidtexts = 0;
+
hash_seq_init(&hash_seq, hash_table);
while ((entry = hash_seq_search(&hash_seq)) != NULL)
{