]> granicus.if.org Git - php/commitdiff
Fix initialisation order
authorJohannes Schlüter <johannes@php.net>
Tue, 20 Feb 2018 22:35:57 +0000 (23:35 +0100)
committerJohannes Schlüter <johannes@php.net>
Tue, 20 Feb 2018 22:35:57 +0000 (23:35 +0100)
ext/mysqlnd/mysqlnd_wireprotocol.c

index 72654a4e47b877e1dae13744f62499de1e7a54d5..9d9b84b002d88ab47c66e4981a89b3a3471210b5 100644 (file)
@@ -2411,8 +2411,8 @@ static void
 MYSQLND_METHOD(mysqlnd_protocol, init_sha256_pk_request_response_packet)(struct st_mysqlnd_packet_sha256_pk_request_response *packet)
 {
        DBG_ENTER("mysqlnd_protocol::init_sha256_pk_request_response_packet");
-       packet->header.m = &packet_methods[PROT_SHA256_PK_REQUEST_RESPONSE_PACKET];
        memset(packet, 0, sizeof(*packet));
+       packet->header.m = &packet_methods[PROT_SHA256_PK_REQUEST_RESPONSE_PACKET];
        DBG_VOID_RETURN;
 }
 /* }}} */