]> granicus.if.org Git - p11-kit/commitdiff
trust: Fix double close()
authorPankaj <pankaj.s01@samsung.com>
Mon, 1 Jun 2015 20:04:22 +0000 (22:04 +0200)
committerStef Walter <stefw@redhat.com>
Mon, 1 Jun 2015 20:04:22 +0000 (22:04 +0200)
trust/save.c

index 6533bd19caed4cede155373c109c1c32a184fc36..b7ab21e642f1658aba2a19bc123eb142527d157f 100644 (file)
@@ -233,7 +233,6 @@ p11_save_finish_file (p11_save_file *file,
        /* Set the mode of the file, readable by everyone, but not writable */
        } else if (chmod (file->temp, S_IRUSR | S_IRGRP | S_IROTH) < 0) {
                p11_message_err (errno, "couldn't set file permissions: %s", file->temp);
-               close (file->fd);
                ret = false;
 
        /* Atomically rename the tempfile over the filename */