]> granicus.if.org Git - php/commitdiff
Make sure context is set to null to prevent use after free
authorCaleb Champlin <caleb.champlin@gmail.com>
Mon, 2 Nov 2015 21:58:04 +0000 (21:58 +0000)
committerXinchen Hui <laruence@gmail.com>
Mon, 9 Nov 2015 03:58:34 +0000 (11:58 +0800)
main/streams/streams.c

index 3ad44b07a95906b8c04c7e3c45fc8f4d14777a91..d0f8a44b989e2ace12b422425d76cf485043a6b5 100644 (file)
@@ -84,6 +84,7 @@ fprintf(stderr, "forget_persistent: %s:%p\n", stream->ops->label, stream);
 
        if (stream->ctx) {
                zend_list_delete(stream->ctx);
+               stream->ctx = NULL;
        }
 
        return 0;