]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Avoid freeing fsp twice when opening new_file fails. (Debian #431696)
authorJelmer Vernooij <jelmer@samba.org>
Mon, 29 Sep 2008 17:09:53 +0000 (19:09 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 29 Sep 2008 17:09:53 +0000 (19:09 +0200)
If opening new_file fails, fsp would still be set to the files_struct of
old_file.

source3/printing/nt_printing.c

index ded985c260d5af5bc28a044d0d4c600e740bfbf4..a3b3a1021fca761e768e30229e0d12baf5017fff 100644 (file)
@@ -1377,6 +1377,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);