From: Riccardo Magliocchetti Date: Fri, 1 Feb 2013 18:22:17 +0000 (+0100) Subject: afpd/hash: avoid use after free in main in case of OOM X-Git-Url: https://arthur.barton.de/gitweb/?a=commitdiff_plain;h=e86e6fa4710f6831d07285303df6503087435c86;hp=9df0118bdf4c2831b0d376dca4c80e91ffb5f31d;p=netatalk.git afpd/hash: avoid use after free in main in case of OOM Reported by Coverity as CID #968574, #968575. --- diff --git a/etc/afpd/hash.c b/etc/afpd/hash.c index 4861e811..d88cb0c2 100644 --- a/etc/afpd/hash.c +++ b/etc/afpd/hash.c @@ -1012,6 +1012,7 @@ int main(void) puts("out of memory"); free((void *) key); free(val); + break; } if (!hash_alloc_insert(h, key, val)) {