gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [patch #8275] Fix double close in FBGui::~FBGui() - CID 1


From: Petter Reinholdtsen
Subject: [Gnash-commit] [patch #8275] Fix double close in FBGui::~FBGui() - CID 1149311
Date: Tue, 14 Jan 2014 14:30:31 +0000
User-agent: Opera/9.80 (X11; Linux x86_64) Presto/2.12.388 Version/12.16

URL:
  <http://savannah.gnu.org/patch/?8275>

                 Summary: Fix double close in FBGui::~FBGui() - CID 1149311
                 Project: Gnash - The GNU Flash player
            Submitted by: pere
            Submitted on: Tue 14 Jan 2014 14:30:31 GMT
                Category: gui-fb
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

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;
     }





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8275>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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