From c2a70b7de0e15dc80d5b56d438a6d4ed47647b44 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 29 Mar 2026 09:10:57 +0100 Subject: libreboot-utils: simplify random tmpdir namegen generalise it in rand.c because this logic will be useful for other programs in the future. Signed-off-by: Leah Rowe --- util/libreboot-utils/lib/file.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'util/libreboot-utils/lib/file.c') diff --git a/util/libreboot-utils/lib/file.c b/util/libreboot-utils/lib/file.c index 3620f425..48eb37ed 100644 --- a/util/libreboot-utils/lib/file.c +++ b/util/libreboot-utils/lib/file.c @@ -537,20 +537,6 @@ try_err(int loop_err, int errval) return -1; } -void -free_and_set_null(char **buf) -{ - if (buf == NULL) - err_exit(EFAULT, - "null ptr (to ptr for freeing) in free_and_set_null"); - - if (*buf == NULL) - return; - - free(*buf); - *buf = NULL; -} - void open_on_eintr(const char *path, int *fd, int flags, mode_t mode, -- cgit v1.2.1