From cbed35efd34c08a7610d18269e5860cd874480f9 Mon Sep 17 00:00:00 2001
From: antirez <antirez@gmail.com>
Date: Thu, 7 Feb 2019 16:47:14 +0100
Subject: [PATCH] ACL: add assertion and fix comment typo.

---
 src/acl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/acl.c b/src/acl.c
index 3133bfec..12253f6c 100644
--- a/src/acl.c
+++ b/src/acl.c
@@ -1199,12 +1199,13 @@ sds ACLLoadFromFile(const char *filename) {
     ACLFreeUser(fakeuser);
     sdsfreesplitres(lines,totlines);
 
-    /* Chec if we found errors and react accordingly. */
+    /* Check if we found errors and react accordingly. */
     if (sdslen(errors) == 0) {
         /* The default user pointer is referenced in different places: instead
          * of replacing such occurrences it is much simpler to copy the new
          * default user configuration in the old one. */
         user *new = ACLGetUserByName("default",7);
+        serverAssert(new != NULL);
         ACLCopyUser(DefaultUser,new);
         ACLFreeUser(new);
         raxInsert(Users,(unsigned char*)"default",7,DefaultUser,NULL);