mirror of
https://github.com/strongswan/strongswan.git
synced 2025-12-04 00:00:21 -05:00
Allow memwipe() to be called with NULL argument
This commit is contained in:
parent
e4d5e0114f
commit
c480b5f458
@ -423,6 +423,10 @@ static inline void memwipe_inline(void *ptr, size_t n)
|
||||
*/
|
||||
static inline void memwipe(void *ptr, size_t n)
|
||||
{
|
||||
if (!ptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (__builtin_constant_p(n))
|
||||
{
|
||||
memwipe_inline(ptr, n);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user