git:5.0:1df7cc74: domain: fix uninitialized variable

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

git:5.0:1df7cc74: domain: fix uninitialized variable

Daniel-Constantin Mierla-6
Module: kamailio
Branch: 5.0
Commit: 1df7cc74fac83aee1d0131962ccefb81d73125e1
URL: https://github.com/kamailio/kamailio/commit/1df7cc74fac83aee1d0131962ccefb81d73125e1

Author: Daniel-Constantin Mierla <[hidden email]>
Committer: Daniel-Constantin Mierla <[hidden email]>
Date: 2017-06-15T15:56:56+02:00

domain: fix uninitialized variable

- reported by Juha Heinanen

---

Modified: src/modules/domain/domain.c

---

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

---

diff --git a/src/modules/domain/domain.c b/src/modules/domain/domain.c
index e8d75b87e9..f54ccf6185 100644
--- a/src/modules/domain/domain.c
+++ b/src/modules/domain/domain.c
@@ -175,7 +175,7 @@ int w_lookup_domain(struct sip_msg *_msg, char *_sp, char *_prefix)
 
  int_str name, val;
  struct attr_list *attrs;
- str *prefix, did;
+ str did;
  unsigned short flags;
  str sdomain;
  str sprefix;
@@ -219,7 +219,7 @@ int w_lookup_domain(struct sip_msg *_msg, char *_sp, char *_prefix)
  return -1;
  }
  LM_DBG("added AVP '%.*s'\n", name.s.len, name.s.s);
- if(prefix)
+ if(_prefix)
  pkg_free(name.s.s);
  attrs = attrs->next;
  }
@@ -468,4 +468,4 @@ int reload_tables(void)
  res = NULL;
  domain_db_close();
  return -1;
-}
\ No newline at end of file
+}


_______________________________________________
Kamailio (SER) - Development Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Loading...