diff options
-rw-r--r-- | main/devicestate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/main/devicestate.c b/main/devicestate.c index 83cbbb7b4..49b7e1efc 100644 --- a/main/devicestate.c +++ b/main/devicestate.c @@ -327,8 +327,10 @@ static enum ast_device_state _ast_device_state(const char *device, int check_cac buf = ast_strdupa(device); tech = strsep(&buf, "/"); if (!(number = buf)) { - if (!(provider = strsep(&tech, ":"))) + provider = strsep(&tech, ":"); + if (!tech) { return AST_DEVICE_INVALID; + } /* We have a provider */ number = tech; tech = NULL; |