[sr-dev] git:master: selects: shm_free_select wrapper added

Miklos Tirpak miklos at iptel.org
Fri Feb 5 16:53:08 CET 2010


Module: sip-router
Branch: master
Commit: df1f139a9b33467b2f7b3497462198467efd4397
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=df1f139a9b33467b2f7b3497462198467efd4397

Author: Miklos Tirpak <miklos at iptel.org>
Committer: Miklos Tirpak <miklos at iptel.org>
Date:   Mon Nov  9 17:08:08 2009 +0100

selects: shm_free_select wrapper added

shm_free_select() function is added that frees the select
parsed by shm_parse_select().

---

 select.c |    6 ++++++
 select.h |    6 ++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/select.c b/select.c
index f99ff02..f247687 100644
--- a/select.c
+++ b/select.c
@@ -237,6 +237,12 @@ void free_select(select_t *s)
 		pkg_free(s);
 }
 
+void shm_free_select(select_t *s)
+{
+	if (s)
+		shm_free(s);
+}
+
 int shm_parse_select (char** p, select_t** s)
 {
 	select_t* sel;
diff --git a/select.h b/select.h
index 5b784eb..035d699 100644
--- a/select.h
+++ b/select.h
@@ -204,6 +204,12 @@ void free_select(select_t *s);
  */
 int shm_parse_select (char** p, select_t** s);
 
+/**
+ * Frees the select obtained with shm_parse_select().
+ */
+void shm_free_select(select_t *s);
+
+
 #define SELECT_F(function) extern int function (str* res, select_t* s, struct sip_msg* msg);
 #define ABSTRACT_F(function) int function (str* res, select_t* s, struct sip_msg* msg) {return -1;}
 




More information about the sr-dev mailing list