--- zzzz-none-000/linux-2.6.32.61/kernel/cred.c 2013-06-10 09:43:48.000000000 +0000 +++ ar9-7330-650/linux-2.6.32.61/kernel/cred.c 2015-04-09 11:31:23.000000000 +0000 @@ -387,8 +387,12 @@ #endif new = kmem_cache_alloc(cred_jar, GFP_ATOMIC); - if (!new) + if (!new) { +#ifdef CONFIG_KEYS + kfree(tgcred); +#endif return NULL; + } kdebug("prepare_usermodehelper_creds() alloc %p", new);