patchGnash - The GNU Flash player - Patches: patch #8275, Fix double close in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #8275: Fix double close in FBGui::~FBGui() - CID 1149311

Submitter:  Petter Reinholdtsen <pere>
Submitted:  Tue 14 Jan 2014 02:30:31 PM UTC
   
 
Category:  gui-fb Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed

Wed 15 Jan 2014 10:45:03 AM UTC, comment #1: 

Patch commited.

Petter Reinholdtsen <pere>
Group Member
Tue 14 Jan 2014 02:30:31 PM UTC, original submission:  

I had a quick look at the new Coverity scan result, and decided to try
to address CID 1149311 which report a double close that can happen if
some error condition occur.  This patch should solve the problem:

diff --git a/gui/fb/fb.cpp b/gui/fb/fb.cpp
index 98b9fb1..34d168b 100644
--- a/gui/fb/fb.cpp
+++ b/gui/fb/fb.cpp
@@ -709,6 +709,7 @@ FBGui::enable_terminal()
     if (ioctl(fd, VT_ACTIVATE, _original_vt)) {
         log_error(_("Could not activate VT number %d"), _original_vt);
         close(_fd);
+        _fd = -1;
         close(fd);
         return false;
     }

Petter Reinholdtsen <pere>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by strk (Updated the item)
  • -email is unavailable- added by pere (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-01-15 strk StatusNone Done
    2014-01-15 pere Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code