diff options
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/util.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index 9a4d0d9e25..8afa2f8c01 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -3219,3 +3219,19 @@ BOOL become_user_permanently(uid_t uid, gid_t gid) return(True); } + +void free_char_array(uint32 num_entries, char **entries) +{ + uint32 i; + if (entries != NULL) + { + for (i = 0; i < num_entries; i++) + { + if (entries[i] != NULL) + { + free(entries[i]); + } + } + free(entries); + } +} |