From: Jelmer Vernooij Date: Mon, 29 Sep 2008 17:53:36 +0000 (-0700) Subject: Avoid freeing fsp twice when opening new_file fails. (Debian #431696) X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f75b53f85cbccc4b37db4c9adc0df81a06898d38;p=thirdparty%2Fsamba.git Avoid freeing fsp twice when opening new_file fails. (Debian #431696) If opening new_file fails, fsp would still be set to the files_struct of old_file. --- diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index a66b1e5c5f6..2c376933059 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -1379,6 +1379,7 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr } } close_file(fsp, NORMAL_CLOSE); + fsp = NULL; /* Get file version info (if available) for new file */ filepath = driver_unix_convert(conn,new_file,&stat_buf);