Ressurect change 27824, which plugs a resource leak in uncalled code.
[p5sagit/p5-mst-13.2.git] / op.c
diff --git a/op.c b/op.c
index c27d785..30231d3 100644 (file)
--- a/op.c
+++ b/op.c
@@ -248,6 +248,7 @@ Perl_allocmy(pTHX_ char *name)
            /* 1999-02-27 mjd@plover.com */
            char *p;
            p = strchr(name, '\0');
+           assert(p);
            /* The next block assumes the buffer is at least 205 chars
               long.  At present, it's always at least 256 chars. */
            if (p - name > 200) {
@@ -6416,6 +6417,7 @@ Perl_ck_fun(pTHX_ OP *o)
                            else if (kid->op_type == OP_AELEM
                                     || kid->op_type == OP_HELEM)
                            {
+                                OP *firstop;
                                 OP *op = ((BINOP*)kid)->op_first;
                                 name = NULL;
                                 if (op) {
@@ -6425,10 +6427,10 @@ Perl_ck_fun(pTHX_ OP *o)
                                           "[]" : "{}";
                                      if (((op->op_type == OP_RV2AV) ||
                                           (op->op_type == OP_RV2HV)) &&
-                                         (op = ((UNOP*)op)->op_first) &&
-                                         (op->op_type == OP_GV)) {
+                                         (firstop = ((UNOP*)op)->op_first) &&
+                                         (firstop->op_type == OP_GV)) {
                                           /* packagevar $a[] or $h{} */
-                                          GV * const gv = cGVOPx_gv(op);
+                                          GV * const gv = cGVOPx_gv(firstop);
                                           if (gv)
                                                tmpstr =
                                                     Perl_newSVpvf(aTHX_