diff --git a/Userland/Libraries/LibCore/System.h b/Userland/Libraries/LibCore/System.h index fb74bae9926..24f1f072237 100644 --- a/Userland/Libraries/LibCore/System.h +++ b/Userland/Libraries/LibCore/System.h @@ -264,7 +264,11 @@ private: } struct AddrInfoDeleter { - void operator()(struct addrinfo* ptr) { ::freeaddrinfo(ptr); } + void operator()(struct addrinfo* ptr) + { + if (ptr) + ::freeaddrinfo(ptr); + } }; Vector m_addresses {};