Allow memwipe() to be called with NULL argument

This commit is contained in:
Tobias Brunner 2013-05-27 18:41:16 +02:00
parent e4d5e0114f
commit c480b5f458

View File

@ -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);