Skip to content

Commit 82f2a17

Browse files
committed
resolving overflow error
1 parent cdd6d54 commit 82f2a17

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

source/mqtt5_client.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,8 @@ PyObject *aws_py_mqtt5_client_new(PyObject *self, PyObject *args) {
10351035
AWS_ZERO_STRUCT(tls_options);
10361036
struct aws_mqtt5_user_property *user_properties_tmp = NULL;
10371037
struct aws_mqtt5_user_property *will_user_properties_tmp = NULL;
1038+
struct aws_mqtt_iot_metrics metrics_tmp;
1039+
AWS_ZERO_STRUCT(metrics_tmp);
10381040

10391041
struct aws_mqtt5_client_options client_options;
10401042
AWS_ZERO_STRUCT(client_options);
@@ -1379,9 +1381,6 @@ PyObject *aws_py_mqtt5_client_new(PyObject *self, PyObject *args) {
13791381
}
13801382

13811383
/* METRICS */
1382-
struct aws_mqtt_iot_metrics metrics_tmp;
1383-
AWS_ZERO_STRUCT(metrics_tmp);
1384-
13851384
if (PyObject_IsTrue(is_metrics_enabled_py) && metrics_py != Py_None) {
13861385
if (!aws_py_metrics_parse(metrics_py, &metrics_tmp)) {
13871386
goto done;

0 commit comments

Comments
 (0)