#include "alloc-util.h"
#include "macro.h"
-#include "memory-util.h"
void* memdup(const void *p, size_t l) {
void *ret;
#include "assert-util.h"
#include "macro.h"
+#include "memory-util.h"
#if HAS_FEATURE_MEMORY_SANITIZER
# include <sanitizer/msan_interface.h>
return q;
}
-
-#include "memory-util.h"
#include "keyring-util.h"
#include "log.h"
+#include "alloc-util.h"
#include "memory-util.h"
#include "missing_syscall.h"
#include <threads.h>
#include <unistd.h>
+#include "alloc-util.h"
#include "memory-util.h"
size_t page_size(void) {
return p;
}
+
+void* erase_and_free(void *p) {
+ size_t l;
+
+ if (!p)
+ return NULL;
+
+ l = MALLOC_SIZEOF_SAFE(p);
+ explicit_bzero_safe(p, l);
+ return mfree(p);
+}
#include <string.h>
#include <sys/types.h>
-#include "alloc-util.h"
#include "macro.h"
#include "memory-util-fundamental.h"
return (uint8_t*) p + needlelen;
}
-static inline void* erase_and_free(void *p) {
- size_t l;
-
- if (!p)
- return NULL;
-
- l = MALLOC_SIZEOF_SAFE(p);
- explicit_bzero_safe(p, l);
- return mfree(p);
-}
+void* erase_and_free(void *p);
static inline void erase_and_freep(void *p) {
erase_and_free(*(void**) p);
#include "sd-json.h"
+#include "alloc-util.h"
#include "cryptsetup-token.h"
#include "cryptsetup-token-util.h"
#include "hexdecoct.h"
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include "alloc-util.h"
#include "memory-util.h"
#include "random-util.h"
#include "recovery-key.h"