libratbag-util: make dpi_list_free() be able to take NULL

free() can take NULL without errors, and so should such helper.
This commit is contained in:
Yaroslav Chvanov
2023-03-06 23:41:40 +03:00
parent 2a356736f7
commit 2734bc17de

View File

@@ -264,6 +264,8 @@ struct dpi_list {
static inline void
dpi_list_free(struct dpi_list *list)
{
if (list == NULL)
return;
free(list->entries);
free(list);
}