From 1dfdcec34ccf097d5e3a9e16e0bb6b93a3415883 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 16 Mar 2016 21:52:30 -0700 Subject: [PATCH] GUAC-236: Do not attempt to lock/close fd if open fails. --- src/common/guac_recording.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/guac_recording.c b/src/common/guac_recording.c index 461b80e8..709375f1 100644 --- a/src/common/guac_recording.c +++ b/src/common/guac_recording.c @@ -104,6 +104,10 @@ static int guac_common_recording_open(const char* path, } + /* Abort if we've run out of filenames */ + if (fd == -1) + return -1; + } /* end if open succeeded */ /* Lock entire output file for writing by the current process */