]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Add a NULL check for get quota command output
authorVolker Lendecke <vl@samba.org>
Wed, 14 Jan 2026 09:12:22 +0000 (10:12 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 20 Jan 2026 11:53:34 +0000 (11:53 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/lib/sysquotas.c

index 5f8d06634d6b6586761952b47b58de6d675f5387..276513b2a7873c97475939d7afe5b699ad92332c 100644 (file)
@@ -294,8 +294,9 @@ static int command_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t
        lines = file_lines_ploadv(talloc_tos(), argl, NULL);
        TALLOC_FREE(argl);
 
-       if (lines == NULL) {
+       if ((lines == NULL) || (lines[0] == NULL)) {
                DBG_ERR("get_quota_command failed!\n");
+               TALLOC_FREE(lines);
                return -1;
        }