Allow memwipe() to be called with NULL argument
This commit is contained in:
1 parent
e4d5e0114f
commit
c480b5f458
1 file changed
+4
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user