summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/irm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/irm.c b/src/lib/irm.c
index ca2111ca..ee1851a3 100644
--- a/src/lib/irm.c
+++ b/src/lib/irm.c
@@ -269,9 +269,11 @@ static int check_ap_path(char ** ap_name)
if (*ap_name == NULL || path == NULL)
return -EINVAL;
- if (!strlen(path) || strchr(*ap_name, '/') == NULL)
+ if (!strlen(path) || strchr(*ap_name, '/') != NULL) {
if ((ret = check_ap(*ap_name)) < 0)
return ret;
+ return 0;
+ }
tmp = malloc(strlen(path) + strlen(*ap_name) + 2);
if (tmp == NULL)