mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user