Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit de6226f

Browse files
committed
Fix reposponse allocation in broadcast function
1 parent d908574 commit de6226f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pg_shardman.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ broadcast(PG_FUNCTION_ARGS)
146146

147147
elog(DEBUG1, "Broadcast commmand '%s'", sql);
148148

149-
SPI_connect();
149+
initStringInfo(&resp);
150150

151+
SPI_connect();
151152
conn = (PGconn**) palloc(sizeof(PGconn*) * n_cons);
152-
initStringInfo(&resp);
153153

154154
while ((sep = strchr(sql, *sql == '{' ? '}' : ';')) != NULL)
155155
{

0 commit comments

Comments
 (0)