aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/acl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/acl.c b/util/acl.c
index a7f33ff7bb..938b7ae2d2 100644
--- a/util/acl.c
+++ b/util/acl.c
@@ -138,9 +138,9 @@ int qemu_acl_insert(qemu_acl *acl,
if (index <= 0)
return -1;
- if (index >= acl->nentries)
+ if (index > acl->nentries) {
return qemu_acl_append(acl, deny, match);
-
+ }
entry = g_malloc(sizeof(*entry));
entry->match = g_strdup(match);