]> git.baikalelectronics.ru Git - kernel.git/commit
lib: string_helpers: provide kfree_strarray()
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 29 Sep 2020 10:09:55 +0000 (12:09 +0200)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Wed, 30 Sep 2020 08:50:30 +0000 (10:50 +0200)
commit8dc5380d286e93882a6acea6ea85c0abac4424ac
treea61c43f7314e424e4814a91ed437c485ac031dc6
parent2d5430a3bd31e2bd3db0075144b7c86c20745b7f
lib: string_helpers: provide kfree_strarray()

There's a common pattern of dynamically allocating an array of char
pointers and then also dynamically allocating each string in this
array. Provide a helper for freeing such a string array with one call.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
include/linux/string_helpers.h
lib/string_helpers.c