Module: kamailio Branch: master Commit: 4e6c8fe6073d7d52bab66faa68abad2f685d2090 URL: https://github.com/kamailio/kamailio/commit/4e6c8fe6073d7d52bab66faa68abad2f...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2019-10-05T20:41:50+02:00
presence: free allocated memory in case of error
---
Modified: src/modules/presence/notify.c
---
Diff: https://github.com/kamailio/kamailio/commit/4e6c8fe6073d7d52bab66faa68abad2f... Patch: https://github.com/kamailio/kamailio/commit/4e6c8fe6073d7d52bab66faa68abad2f...
---
diff --git a/src/modules/presence/notify.c b/src/modules/presence/notify.c index f9ce4c403f..245c2b95c0 100644 --- a/src/modules/presence/notify.c +++ b/src/modules/presence/notify.c @@ -2018,6 +2018,7 @@ int add_waiting_watchers(watcher_t *watchers, str pres_uri, str event)
w = (watcher_t *)pkg_malloc(sizeof(watcher_t)); if(w == NULL) { + pkg_free(wuri.s); ERR_MEM(PKG_MEM_STR); } memset(w, 0, sizeof(watcher_t));