diff options
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 4bebce867..df9468462 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -14959,7 +14959,11 @@ static int function_sippeer(struct ast_channel *chan, const char *cmd, char *dat codecnum = strsep(&codecnum, "]"); /* trim trailing ']' if any */ if((codec = ast_codec_pref_index(&peer->prefs, atoi(codecnum)))) { ast_copy_string(buf, ast_getformatname(codec), len); + } else { + buf[0] = '\0'; } + } else { + buf[0] = '\0'; } unref_peer(peer, "unref_peer from function_sippeer, just before return"); |