[sr-dev] git:master:d24863d0: presence: init variable to prevent invalid cleanup on error getting presence document

Daniel-Constantin Mierla miconda at gmail.com
Mon Dec 14 16:43:23 CET 2015


Module: kamailio
Branch: master
Commit: d24863d071417effe5df863736ef037ec8e0b414
URL: https://github.com/kamailio/kamailio/commit/d24863d071417effe5df863736ef037ec8e0b414

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-12-14T16:43:05+01:00

presence: init variable to prevent invalid cleanup on error getting presence document

- reported by GH#441

---

Modified: modules/presence/publish.c

---

Diff:  https://github.com/kamailio/kamailio/commit/d24863d071417effe5df863736ef037ec8e0b414.diff
Patch: https://github.com/kamailio/kamailio/commit/d24863d071417effe5df863736ef037ec8e0b414.patch

---

diff --git a/modules/presence/publish.c b/modules/presence/publish.c
index 5a48f77..73a64c6 100644
--- a/modules/presence/publish.c
+++ b/modules/presence/publish.c
@@ -509,7 +509,7 @@ int handle_publish(struct sip_msg* msg, char* sender_uri, char* str2)
 int update_hard_presentity(str *pres_uri, pres_ev_t *event, str *file_uri, str *filename)
 {
 	int ret = -1, new_t, pidf_result;
-	str *pidf_doc;
+	str *pidf_doc = 0;
 	char *sphere = NULL;
 	presentity_t *pres = NULL;
 	struct sip_uri parsed_uri;




More information about the sr-dev mailing list