summaryrefslogtreecommitdiffstats
path: root/runtime/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/vm.c')
-rw-r--r--runtime/vm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/vm.c b/runtime/vm.c
index d7cd52d5..aaf3c879 100644
--- a/runtime/vm.c
+++ b/runtime/vm.c
@@ -88,6 +88,9 @@ rsfrAddFunction(uchar *szName, prsf_t rsf)
funcRegRoot = pEntry;
finalize_it:
+ if(iRet != RS_RET_OK && iRet != RS_RET_DUP_FUNC_NAME)
+ free(pEntry);
+
RETiRet;
}