Re: [PATCH 2/4] fdisk: fix: opened file leaving unclosed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 22, 2007 at 11:25:39AM +0800, lizf wrote:
> Signed-off-by: Li Zefan <lizf@xxxxxxxxxxxxxx>
> ---
>  fdisk/sfdisk.c |   69 ++++++++++++++++++++++++++++++++++++++++++++-----------
>  1 files changed, 55 insertions(+), 14 deletions(-)

 Applied with a few changes. sfdisk(8) code is <something impolite> ...

> @@ -387,7 +395,18 @@ restore_sectors(char *dev) {
>  
>      reread_disk_partition(dev, fdout);
>  
> +    close(fdin);
> +    close(fdout);
> +

 ... that's hell, reread_disk_partition() is closing fdout.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux