Skip to content

Commit 972929b

Browse files
kvapkelvich
authored andcommitted
Fix a local pointer return in raft implementation.
1 parent cc8cdd3 commit 972929b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/pg_dtm/dtmd/src/raft.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,12 +662,13 @@ void raft_handle_message(raft_t *r, raft_msg_t *m) {
662662
}
663663
}
664664

665+
static char buf[1024];
666+
665667
raft_msg_t *raft_recv_message(raft_t *r) {
666668
struct sockaddr_in addr;
667669
unsigned int addrlen = sizeof(addr);
668670

669671
//try to receive some data, this is a blocking call
670-
char buf[1024];
671672
raft_msg_t *m = (raft_msg_t *)buf;
672673
int recved = recvfrom(
673674
r->sock, buf, sizeof(buf), 0,

0 commit comments

Comments
 (0)