summaryrefslogtreecommitdiff
path: root/doop.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-04-18 11:18:12 +0000
committerNicholas Clark <nick@ccl4.org>2006-04-18 11:18:12 +0000
commit4154741246a440c7ccc4e633e6d115949af4ee56 (patch)
tree34bef2beab8b0c35a44b7d0d042d55c8f10c169f /doop.c
parentecaa9b9cab16865b1a89bd4b15cd989b1eb47178 (diff)
downloadperl-4154741246a440c7ccc4e633e6d115949af4ee56.tar.gz
Coverity still thinks that there is a route through do_vop that can
leak resources. I believe that it's spotted that you can skip all the cases in the switch. Plug that hole. p4raw-id: //depot/perl@27883
Diffstat (limited to 'doop.c')
-rw-r--r--doop.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/doop.c b/doop.c
index 08b6c230a7..202e320b3c 100644
--- a/doop.c
+++ b/doop.c
@@ -1282,6 +1282,11 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right)
*SvEND(sv) = '\0';
Safefree(dcsave);
break;
+ default:
+ if (sv == left || sv == right)
+ Safefree(dcorig);
+ Perl_croak(aTHX_ "panic: do_vop called for op %u (%s)", optype,
+ PL_op_name[optype]);
}
SvUTF8_on(sv);
goto finish;