Module: kamailio
Branch: master
Commit: bf9d697c31ad2c7614aa37997c4772df8e8d25a7
URL:
https://github.com/kamailio/kamailio/commit/bf9d697c31ad2c7614aa37997c4772d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-07-09T10:01:17+02:00
async: free var in case of fixup error
---
Modified: src/modules/async/async_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/bf9d697c31ad2c7614aa37997c4772d…
Patch:
https://github.com/kamailio/kamailio/commit/bf9d697c31ad2c7614aa37997c4772d…
---
diff --git a/src/modules/async/async_mod.c b/src/modules/async/async_mod.c
index c781753042..90588f1d12 100644
--- a/src/modules/async/async_mod.c
+++ b/src/modules/async/async_mod.c
@@ -194,8 +194,10 @@ static int fixup_async_sleep(void **param, int param_no)
}
memset(ap, 0, sizeof(async_param_t));
ap->u.paction = get_action_from_param(param, param_no);
- if(fixup_igp_null(param, param_no) < 0)
+ if(fixup_igp_null(param, param_no) < 0) {
+ pkg_free(ap);
return -1;
+ }
ap->pinterval = (gparam_t *)(*param);
*param = (void *)ap;
return 0;