Skip to content

Commit 803b571

Browse files
committed
correct uninitialized variable
1 parent 32580bd commit 803b571

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/gstype_python.i

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,7 @@ static bool convertToFieldWithType(GSRow *row, int column, PyObject* value, GSTy
10651065
PyErr_SetString(PyExc_ValueError, "Memory allocation error");
10661066
SWIG_fail;
10671067
}
1068-
1068+
memset($1, 0x0, $2 * sizeof(GSPropertyEntry));
10691069
memset(alloc, 0, $2 * 2 * sizeof(int));
10701070
i = 0;
10711071
j = 0;
@@ -1198,6 +1198,7 @@ static bool convertToFieldWithType(GSRow *row, int column, PyObject* value, GSTy
11981198
PyErr_SetString(PyExc_ValueError, "Memory allocation error");
11991199
SWIG_fail;
12001200
}
1201+
memset(pList, 0x0, $2 * sizeof(GSRowKeyPredicateEntry));
12011202
memset(alloc, 0x0, $2 * sizeof(int));
12021203
$1 = &pList;
12031204

0 commit comments

Comments
 (0)