Module: sip-router
Branch: master
Commit: ace56c6bd2221920b965185c1c9a5997cd3f2768
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ace56c6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed May 14 22:56:37 2014 +0200
core: free previous allocated variable if no more pkg to build rve struct
- cleaner shut down if not enough memory at startup
---
rvalue.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/rvalue.c b/rvalue.c
index ddc97c2..8e5ba20 100644
--- a/rvalue.c
+++ b/rvalue.c
@@ -2554,6 +2554,7 @@ struct rval_expr* mk_rval_expr_v(enum rval_type rv_type, void* val,
s=(str*)val;
v.s.s=pkg_malloc(s->len+1 /*0*/);
if (v.s.s==0){
+ pkg_free(rve);
ERR("memory allocation failure\n");
return 0;
}