bug-cpio
[Top][All Lists]
Advanced

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

[Bug-cpio] missing call to fclose in copyin.c


From: Michal Seben
Subject: [Bug-cpio] missing call to fclose in copyin.c
Date: Mon, 19 Oct 2009 14:36:15 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090915 SUSE/3.0b4-1.1 Thunderbird/3.0b4

We've received the following report from a reporter:
https://bugzilla.novell.com/show_bug.cgi?id=543132 :

--------------------
source code file cpio-2.10/src/copyin.c
function process_copy_in
local variable tty_out.

I notice the following code

      tty_out = fopen (TTY_NAME, "w");

but I fail to notice a matching call to fclose. This looks like a resource
leak to me. Suggest add call to fclose near the end of the function.
--------------------


I also attach suggested fix from Robert Schweikert

thanks


Attachment: cpio-2.10-close_files_after_copy.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]