diff --git a/modules/tsilo/ts_append.c b/modules/tsilo/ts_append.c index 3c476630da7..db47fdfad7d 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;