develooper Front page | perl.perl5.porters | Postings from October 2005

[PATCH] predecrement vs postdecrement

Thread Next
From:
Jarkko Hietaniemi
Date:
October 29, 2005 01:23
Subject:
[PATCH] predecrement vs postdecrement
Message ID:
4363320F.2010506@gmail.com
Tries were never freed.

--- regcomp.c.dist      2005-10-29 11:11:15.000000000 +0300
+++ regcomp.c   2005-10-29 11:19:45.000000000 +0300
@@ -6072,7 +6072,7 @@
                        reg_trie_data
*trie=(reg_trie_data*)r->data->data[n];
                        U32 refcount;
                        OP_REFCNT_LOCK;
-                       refcount = trie->refcount--;
+                       refcount = --trie->refcount;
                        OP_REFCNT_UNLOCK;
                        if ( !refcount ) {
                            Safefree(trie->charmap);

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About