diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d888fa19ae..4dd79a190e 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -2254,9 +2254,9 @@ static int parse_uri(char *uri, char *scheme, int error = 0; /* init field as required */ - if (*pass) + if (pass && *pass) *pass = ""; - if (*port) + if (port && *port) *port = ""; name = strsep(&uri, ";"); /* remove options */ if (scheme) {