Skip to content

Commit fc87edb

Browse files
committed
fix
1 parent 698ace9 commit fc87edb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/bin/pg_upgrade/info.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,8 @@ get_non_default_acl_infos(ClusterInfo *cluster)
348348
DbInfo *dbinfo = &cluster->dbarr.dbs[dbnum];
349349
PGconn *conn = connectToServer(cluster, dbinfo->db_name);
350350
PGresult *res;
351-
AclInfo *aclinfos;
352-
AclInfo *curr;
351+
AclInfo *aclinfos = NULL;
352+
AclInfo *curr = NULL;
353353
int nacls = 0,
354354
size_acls = 8;
355355
int aclnum = 0;
@@ -500,6 +500,7 @@ get_db_infos(ClusterInfo *cluster)
500500

501501
/* initialize clean array */
502502
dbinfos[tupnum].non_def_acl_arr.nacls = 0;
503+
dbinfos[tupnum].non_def_acl_arr.aclinfos = NULL;
503504
}
504505
PQclear(res);
505506

@@ -711,6 +712,7 @@ free_db_and_rel_infos(DbInfoArr *db_arr)
711712
for (dbnum = 0; dbnum < db_arr->ndbs; dbnum++)
712713
{
713714
free_rel_infos(&db_arr->dbs[dbnum].rel_arr);
715+
714716
if (&db_arr->dbs[dbnum].non_def_acl_arr.nacls > 0)
715717
free_acl_infos(&db_arr->dbs[dbnum].non_def_acl_arr);
716718
pg_free(db_arr->dbs[dbnum].db_name);
@@ -750,7 +752,9 @@ free_acl_infos(AclInfoArr *acl_arr)
750752
pg_free(acl_arr->aclinfos[aclnum].obj_ident);
751753
pg_free(acl_arr->aclinfos[aclnum].role_names);
752754
}
755+
753756
pg_free(acl_arr->aclinfos);
757+
acl_arr->aclinfos = NULL;
754758
acl_arr->nacls = 0;
755759
pg_log(PG_REPORT, "free_acl_infos 2 %d\n", acl_arr->nacls);
756760
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy