[prev in list] [next in list] [prev in thread] [next in thread]
List: openser-devel
Subject: [sr-dev] git:master:f0b5fa74: tsilo: init and safety check for t value before unref
From: Daniel-Constantin Mierla <miconda () gmail ! com>
Date: 2015-12-29 22:49:27
Message-ID: E1aE355-000479-Hr () www ! kamailio ! org
[Download RAW message or body]
Module: kamailio
Branch: master
Commit: f0b5fa7415d81cfc6df1e4dd51cd508898df5419
URL: https://github.com/kamailio/kamailio/commit/f0b5fa7415d81cfc6df1e4dd51cd508898df5419
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Committer: Daniel-Constantin Mierla <miconda@gmail.com>
Date: 2015-12-29T23:48:39+01:00
tsilo: init and safety check for t value before unref
---
Modified: modules/tsilo/ts_append.c
---
Diff: https://github.com/kamailio/kamailio/commit/f0b5fa7415d81cfc6df1e4dd51cd508898df5419.diff
Patch: https://github.com/kamailio/kamailio/commit/f0b5fa7415d81cfc6df1e4dd51cd508898df5419.patch
---
diff --git a/modules/tsilo/ts_append.c b/modules/tsilo/ts_append.c
index 3c47663..db47fdf 100644
--- a/modules/tsilo/ts_append.c
+++ b/modules/tsilo/ts_append.c
@@ -82,7 +82,7 @@ int ts_append(struct sip_msg* msg, str *ruri, char *table) {
}
int ts_append_to(struct sip_msg* msg, int tindex, int tlabel, char *table, str *uri) {
- struct cell *t;
+ struct cell *t=0;
struct cell *orig_t;
struct sip_msg *orig_msg;
int ret;
@@ -130,7 +130,7 @@ int ts_append_to(struct sip_msg* msg, int tindex, int tlabel, char *table, str *
done:
/* unref the transaction which had been referred by t_lookup_ident() call.
* Restore the original transaction (if any) */
- _tmb.unref_cell(t);
+ if(t) _tmb.unref_cell(t);
_tmb.t_sett(orig_t, T_BR_UNDEFINED);
return ret;
_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic