Unless we dereference it before passing it to free(), we don't need to
care whether the pointer is NULL - free() can handle it.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
GPIOD_API void gpiod_chip_info_free(struct gpiod_chip_info *info)
{
- if (!info)
- return;
-
free(info);
}
GPIOD_API void gpiod_edge_event_free(struct gpiod_edge_event *event)
{
- if (!event)
- return;
-
free(event);
}
GPIOD_API void gpiod_line_info_free(struct gpiod_line_info *info)
{
- if (!info)
- return;
-
free(info);
}
GPIOD_API void gpiod_request_config_free(struct gpiod_request_config *config)
{
- if (!config)
- return;
-
free(config);
}