diff options
| author | jvoisin | 2021-05-08 17:14:46 +0200 |
|---|---|---|
| committer | jvoisin | 2021-05-08 17:14:46 +0200 |
| commit | 194b0bc9f0a4699854ea314ffa23e59f8082ddae (patch) | |
| tree | e4ff10b44a831bac57ebad21abef1258a5423020 /src/sp_config.c | |
| parent | ad623f1d78151dfe2eaee85e93ed1058be1c7f91 (diff) | |
Remove some memory-leaks
Diffstat (limited to 'src/sp_config.c')
| -rw-r--r-- | src/sp_config.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/sp_config.c b/src/sp_config.c index 69730e3..958c7e5 100644 --- a/src/sp_config.c +++ b/src/sp_config.c | |||
| @@ -216,11 +216,32 @@ void sp_disabled_function_list_free(sp_list_node *list) { | |||
| 216 | sp_list_node *cursor = list; | 216 | sp_list_node *cursor = list; |
| 217 | while (cursor) { | 217 | while (cursor) { |
| 218 | sp_disabled_function *df = cursor->data; | 218 | sp_disabled_function *df = cursor->data; |
| 219 | if (df && df->functions_list) sp_list_free(df->functions_list); | ||
| 220 | if (df) { | 219 | if (df) { |
| 220 | sp_list_free(df->functions_list); | ||
| 221 | sp_list_free(df->param_array_keys); | ||
| 222 | sp_list_free(df->var_array_keys); | ||
| 223 | |||
| 224 | sp_pcre_free(df->r_filename); | ||
| 225 | sp_pcre_free(df->r_function); | ||
| 226 | sp_pcre_free(df->r_param); | ||
| 227 | sp_pcre_free(df->r_ret); | ||
| 228 | sp_pcre_free(df->r_value); | ||
| 229 | sp_pcre_free(df->r_key); | ||
| 230 | |||
| 221 | sp_tree_free(df->param); | 231 | sp_tree_free(df->param); |
| 222 | sp_tree_free(df->var); | 232 | sp_tree_free(df->var); |
| 223 | } | 233 | } |
| 224 | cursor = cursor->next; | 234 | cursor = cursor->next; |
| 225 | } | 235 | } |
| 226 | } | 236 | } |
| 237 | |||
| 238 | void sp_cookie_list_free(sp_list_node *list) { | ||
| 239 | sp_list_node *cursor = list; | ||
| 240 | while (cursor) { | ||
| 241 | sp_cookie *c = cursor->data; | ||
| 242 | if (c) { | ||
| 243 | sp_pcre_free(c->name_r); | ||
| 244 | } | ||
| 245 | cursor = cursor->next; | ||
| 246 | } | ||
| 247 | } | ||
