* plugins.d/mandos-client.c (run_network_hooks): Init "dirent" to NULL and, later, always free() it unless scandirat() or scandir() failed. (main): Fix free() of uninitalized memory in case scandirat() or scandir() of "/sys/class/net" failed. Also, when cleaning up, even if GPGME temp directory is empty, do free(direntries) and remove the directory.