]> granicus.if.org Git - php/commitdiff
ensure freeing of cwd/name happens in all cases
authorGreg Beaver <cellog@php.net>
Tue, 22 Apr 2008 17:34:00 +0000 (17:34 +0000)
committerGreg Beaver <cellog@php.net>
Tue, 22 Apr 2008 17:34:00 +0000 (17:34 +0000)
ext/phar/phar_object.c

index eacf4e9c956e17c4736b49090353b9569799879e..62a469816750be3aac7461c28dda735bbc1bbbb0 100755 (executable)
@@ -313,13 +313,13 @@ static int phar_file_action(phar_entry_data *phar, char *mime_type, int code, ch
                                                }
                                        }
                                } zend_catch {
-                                       if (PHAR_G(cwd)) {
-                                               efree(PHAR_G(cwd));
-                                               PHAR_G(cwd) = NULL;
-                                               PHAR_G(cwd_len) = 0;
-                                       }
-                                       efree(name);
                                } zend_end_try();
+                               if (PHAR_G(cwd)) {
+                                       efree(PHAR_G(cwd));
+                                       PHAR_G(cwd) = NULL;
+                                       PHAR_G(cwd_len) = 0;
+                               }
+                               efree(name);
                                zend_bailout();
                        }
                        return PHAR_MIME_PHP;