From: Volker Lendecke Date: Wed, 14 Jan 2026 07:12:13 +0000 (+0100) Subject: smbd: Add a NULL check for dfree command output X-Git-Tag: tdb-1.4.15~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db2c61f0437eac0ddeb05eeb9e021090ca80d75f;p=thirdparty%2Fsamba.git smbd: Add a NULL check for dfree command output Signed-off-by: Volker Lendecke Reviewed-by: Anoop C S --- diff --git a/source3/smbd/dfree.c b/source3/smbd/dfree.c index 338d50659f3..fef0313b9d2 100644 --- a/source3/smbd/dfree.c +++ b/source3/smbd/dfree.c @@ -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; }