summaryrefslogtreecommitdiff
path: root/ui/qt/follow_stream_dialog.cpp
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2014-11-02 12:58:26 +0100
committerAnders Broman <a.broman58@gmail.com>2014-11-03 07:31:17 +0000
commit1a2fcc51c3fdcd71f002536c2d73f0ec4e1583cc (patch)
tree9e40894646f5e96a6a28a59fd48403da536854f1 /ui/qt/follow_stream_dialog.cpp
parent7b4215dafaeb7716d81c7bec93decac0c3a556f5 (diff)
downloadwireshark-1a2fcc51c3fdcd71f002536c2d73f0ec4e1583cc.tar.gz
Qt: fix a potential memory leak FollowStreamDialog::follow() found by Coverity (CID 1159304)
Change-Id: I53709c6729c6d9156d2ba5ccd83e92bc27433e26 Reviewed-on: https://code.wireshark.org/review/5065 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/follow_stream_dialog.cpp')
-rw-r--r--ui/qt/follow_stream_dialog.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/qt/follow_stream_dialog.cpp b/ui/qt/follow_stream_dialog.cpp
index 91145d339a..562d2a6054 100644
--- a/ui/qt/follow_stream_dialog.cpp
+++ b/ui/qt/follow_stream_dialog.cpp
@@ -1228,7 +1228,10 @@ bool FollowStreamDialog::follow(QString previous_filter, bool use_tcp_index)
followStream();
fillHintLabel(-1);
- data_out_file = NULL;
+ if (data_out_file) {
+ fclose(data_out_file);
+ data_out_file = NULL;
+ }
return true;
}