]> granicus.if.org Git - php/commitdiff
- Simplify/Add comment
authorMarcus Boerger <helly@php.net>
Wed, 10 Jan 2007 00:07:45 +0000 (00:07 +0000)
committerMarcus Boerger <helly@php.net>
Wed, 10 Jan 2007 00:07:45 +0000 (00:07 +0000)
ext/phar/phar.c

index 3b17d9001cfcaeb6e59daf044c8677b9754a5312..24b346247458bd056485603c717a8d2d52914110 100644 (file)
@@ -289,19 +289,14 @@ static spl_other_handler phar_spl_foreign_handler = {
 static void destroy_phar_manifest(void *pDest) /* {{{ */
 {
        phar_entry_info *entry = (phar_entry_info *)pDest;
+       TSRMLS_FETCH();
 
        if (entry->fp) {
-               TSRMLS_FETCH();
-
                php_stream_close(entry->fp);
        }
        if (entry->temp_file) {
-               TSRMLS_FETCH();
-
                php_stream_close(entry->temp_file);
        }
-       entry->fp = 0;
-       entry->temp_file = 0;
        efree(entry->filename);
 }
 /* }}} */
@@ -1479,6 +1474,7 @@ static int phar_stream_close(php_stream *stream, int close_handle TSRMLS_DC) /*
                        php_stream_close(data->fp);
                        data->fp = 0;
                } else {
+                       /* else transfer ownership back */
                        data->internal_file->fp = data->fp;
                }
        }