bindings: python: fix uninitialized default_vals being passed to gpiod_LineBulk_request()
authorKent Gibson <warthog618@gmail.com>
Mon, 15 Feb 2021 14:39:19 +0000 (15:39 +0100)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 15 Feb 2021 14:39:19 +0000 (15:39 +0100)
commit94b6b59b2b4d4b9563a7d0c37ed5bdd14652e262
tree8334e121d9c862d7ad80a3f0b11a82ebd8d5780f
parentc17a273f16890bd4bc3a44ad660342b5ae208895
bindings: python: fix uninitialized default_vals being passed to gpiod_LineBulk_request()

If "default_vals" is not provided in the kwds then default_vals are
passed uninitialized to gpiod_line_request_bulk(), so rename the
existing default_vals to vals and introduce a new default_vals that
points to vals, or NULL if no defaults have been passed.

Fixes: 96c524c4951c (bindings: implement python bindings)
Reported-by: Pedro Botella <pbotella@gmail.com>
Signed-off-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
bindings/python/gpiodmodule.c