Browse code

selects: shm_free_select wrapper added

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

Miklos Tirpak authored on 09/11/2009 16:08:08
Showing 2 changed files
... ...
@@ -237,6 +237,12 @@ void free_select(select_t *s)
237 237
 		pkg_free(s);
238 238
 }
239 239
 
240
+void shm_free_select(select_t *s)
241
+{
242
+	if (s)
243
+		shm_free(s);
244
+}
245
+
240 246
 int shm_parse_select (char** p, select_t** s)
241 247
 {
242 248
 	select_t* sel;
... ...
@@ -204,6 +204,12 @@ void free_select(select_t *s);
204 204
  */
205 205
 int shm_parse_select (char** p, select_t** s);
206 206
 
207
+/**
208
+ * Frees the select obtained with shm_parse_select().
209
+ */
210
+void shm_free_select(select_t *s);
211
+
212
+
207 213
 #define SELECT_F(function) extern int function (str* res, select_t* s, struct sip_msg* msg);
208 214
 #define ABSTRACT_F(function) int function (str* res, select_t* s, struct sip_msg* msg) {return -1;}
209 215