Преглед на файлове

selects: shm_free_select wrapper added

shm_free_select() function is added that frees the select
parsed by shm_parse_select().
Miklos Tirpak преди 16 години
родител
ревизия
df1f139a9b
променени са 2 файла, в които са добавени 12 реда и са изтрити 0 реда
  1. 6 0
      select.c
  2. 6 0
      select.h

+ 6 - 0
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;

+ 6 - 0
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;}