summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/strutils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/strutils.c b/lib/strutils.c
index 8076574c5..e170f560f 100644
--- a/lib/strutils.c
+++ b/lib/strutils.c
@@ -869,8 +869,10 @@ int streq_paths(const char *a, const char *b)
((a_seg && *a_seg == '/') || (b_seg && *b_seg == '/')))
return 1;
+ if (!a_seg || !b_seg)
+ break;
if (a_sz != b_sz || strncmp(a_seg, b_seg, a_sz) != 0)
- return 0;
+ break;
a = a_seg + a_sz;
b = b_seg + b_sz;