- Fixed resource leak
authorFelipe Pena <felipensp@gmail.com>
Sat, 12 Oct 2013 20:25:26 +0000 (17:25 -0300)
committerFelipe Pena <felipensp@gmail.com>
Sat, 12 Oct 2013 20:25:26 +0000 (17:25 -0300)
ext/opcache/zend_accelerator_blacklist.c

index da83cfd3119e1d89c1931e64bec40955eec80758..eb0bc2146cd553105b8aea96980a882b1d3fd09c 100644 (file)
@@ -314,6 +314,7 @@ void zend_accel_blacklist_load(zend_blacklist *blacklist, char *filename)
                blacklist->entries[blacklist->pos].path = (char *)malloc(path_length + 1);
                if (!blacklist->entries[blacklist->pos].path) {
                        zend_accel_error(ACCEL_LOG_ERROR, "malloc() failed\n");
+                       fclose(fp);
                        return;
                }
                blacklist->entries[blacklist->pos].id = blacklist->pos;