]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Add a NULL check for dfree command output
authorVolker Lendecke <vl@samba.org>
Wed, 14 Jan 2026 07:12:13 +0000 (08: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/smbd/dfree.c

index 338d50659f3459914b1723d29e03def0867d92a3..fef0313b9d23034b6ff5340eb897601e6a7af826 100644 (file)
@@ -86,10 +86,11 @@ static bool handle_dfree_command(connection_struct *conn,
 
        TALLOC_FREE(argl);
 
-       if (lines == NULL) {
-               DBG_ERR("file_lines_load() failed for "
+       if ((lines == NULL) || (lines[0] == NULL)) {
+               DBG_ERR("file_lines_ploadv() failed for "
                        "command '%s %s'. Error was : %s\n",
                        dfree_command, path, strerror(errno));
+               TALLOC_FREE(lines);
                return false;
        }